diff --git a/.github/workflows/chat.yml b/.github/workflows/chat.yml new file mode 100644 index 000000000..8c22fa13a --- /dev/null +++ b/.github/workflows/chat.yml @@ -0,0 +1,69 @@ +name: Openim-chat CI + +on: + push: + pull_request: + +jobs: + openim-chat: + name: Test with go ${{ matrix.go_version }} on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + environment: + name: openim + + strategy: + matrix: + go_version: ["1.20"] + os: [ubuntu-latest] + + steps: + - name: Set up Go ${{ matrix.go_version }} + uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.go_version }} + id: go + + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + + - name: Run go modules tidy + run: | + make tidy + + - name: Generate all necessary files, such as error code files + run: | + make generate + + # - name: Check syntax and styling of go sources + # run: | + # set -e + # make lint + + # - name: Run unit test and get test coverage + # run: | + # make cover + + - name: Build source code for host platform + run: | + # make build # skip build for now + + - name: Collect Test Coverage File + uses: actions/upload-artifact@v1.0.0 + with: + name: main-output + path: _output/tmp/coverage.out + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + # skip for now + # - name: Login to DockerHub + # uses: docker/login-action@v1 + # with: + # username: ${{ env.DOCKERHUB_USERNAME }} + # password: ${{ secrets.DOCKERHUB_TOKEN }} + + # skip for now + - name: Build docker images for host arch and push images to registry + run: | + make docker-push \ No newline at end of file diff --git a/.gitignore b/.gitignore index 515d71317..7707a81b7 100644 --- a/.gitignore +++ b/.gitignore @@ -15,5 +15,359 @@ # vendor/ .idea -bin -logs \ No newline at end of file +bin/ +logs + +# Created by https://www.toptal.com/developers/gitignore/api/vim,jetbrains,vscode,git,go,tags,backup,test,emacs +# Edit at https://www.toptal.com/developers/gitignore?templates=vim,jetbrains,vscode,git,go,tags,backup,test,emacs + +### Backup ### +*.bak +*.gho +*.ori +*.orig +*.tmp + +### Git ### +# Created by git for backups. To disable backups in Git: +# $ git config --global mergetool.keepBackup false + +# Created by git when using merge tools for conflicts +*.BACKUP.* +*.BASE.* +*.LOCAL.* +*.REMOTE.* +*_BACKUP_*.txt +*_BASE_*.txt +*_LOCAL_*.txt +*_REMOTE_*.txt + + +### Go ### +# Binaries for programs and plugins +*.exe +*.exe~ +*.dll +*.so +*.dylib + +# Test binary, built with `go test -c` +*.test + +# Output of the go coverage tool, specifically when used with LiteIDE +*.out +_output/ +bin/ + +# Dependency directories (remove the comment below to include it) +# vendor/ + +### Go Patch ### +/vendor/ +/Godeps/ + +### JetBrains ### +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 +.idea + +# User-specific stuff +.idea/**/workspace.xml +.idea/**/tasks.xml +.idea/**/usage.statistics.xml +.idea/**/dictionaries +.idea/**/shelf + +# Generated files +.idea/**/contentModel.xml + +# Sensitive or high-churn files +.idea/**/dataSources/ +.idea/**/dataSources.ids +.idea/**/dataSources.local.xml +.idea/**/sqlDataSources.xml +.idea/**/dynamic.xml +.idea/**/uiDesigner.xml +.idea/**/dbnavigator.xml + +# Gradle +.idea/**/gradle.xml +.idea/**/libraries + +# Gradle and Maven with auto-import +# When using Gradle or Maven with auto-import, you should exclude module files, +# since they will be recreated, and may cause churn. Uncomment if using +# auto-import. +# .idea/artifacts +# .idea/compiler.xml +# .idea/jarRepositories.xml +# .idea/modules.xml +# .idea/*.iml +# .idea/modules +# *.iml +# *.ipr + +# CMake +cmake-build-*/ + +# Mongo Explorer plugin +.idea/**/mongoSettings.xml + +# File-based project format +*.iws + +# IntelliJ +out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Cursive Clojure plugin +.idea/replstate.xml + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + +# Editor-based Rest Client +.idea/httpRequests + +# Android studio 3.1+ serialized cache file +.idea/caches/build_file_checksums.ser + +### JetBrains Patch ### +# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721 + +# *.iml +# modules.xml +# .idea/misc.xml +# *.ipr + +# Sonarlint plugin +# https://plugins.jetbrains.com/plugin/7973-sonarlint +.idea/**/sonarlint/ + +# SonarQube Plugin +# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin +.idea/**/sonarIssues.xml + +# Markdown Navigator plugin +# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced +.idea/**/markdown-navigator.xml +.idea/**/markdown-navigator-enh.xml +.idea/**/markdown-navigator/ + +# Cache file creation bug +# See https://youtrack.jetbrains.com/issue/JBR-2257 +.idea/$CACHE_FILE$ + +# CodeStream plugin +# https://plugins.jetbrains.com/plugin/12206-codestream +.idea/codestream.xml + +### Tags ### +# Ignore tags created by etags, ctags, gtags (GNU global) and cscope +TAGS +.TAGS +!TAGS/ +tags +.tags +!tags/ +gtags.files +GTAGS +GRTAGS +GPATH +GSYMS +cscope.files +cscope.out +cscope.in.out +cscope.po.out + + +### Test ### +### Ignore all files that could be used to test your code and +### you wouldn't want to push + +# Reference https://en.wikipedia.org/wiki/Metasyntactic_variable + +# Most common +*foo +*bar +*fubar +*foobar +*baz + +# Less common +*qux +*quux +*bongo +*bazola +*ztesch + +# UK, Australia +*wibble +*wobble +*wubble +*flob +*blep +*blah +*boop +*beep + +# Japanese +*hoge +*piyo +*fuga +*hogera +*hogehoge + +# Portugal, Spain +*fulano +*sicrano +*beltrano +*mengano +*perengano +*zutano + +# France, Italy, the Netherlands +*toto +*titi +*tata +*tutu +*pipppo +*pluto +*paperino +*aap +*noot +*mies + +# Other names that would make sense +*tests +*testsdir +*testsfile +*testsfiles +*testdir +*testfile +*testfiles +*testing +*testingdir +*testingfile +*testingfiles +*temp +*tempdir +*tempfile +*tempfiles +*tmp +*tmpdir +*tmpfile +*tmpfiles +*lol + +### Vim ### +# Swap +[._]*.s[a-v][a-z] +!*.svg # comment out if you don't need vector files +[._]*.sw[a-p] +[._]s[a-rt-v][a-z] +[._]ss[a-gi-z] +[._]sw[a-p] + +# Session +Session.vim +Sessionx.vim + +# Temporary +.netrwhist +*~ +# Auto-generated tag files +# Persistent undo +[._]*.un~ + +### Emacs ### +# -*- mode: gitignore; -*- +*~ +\#*\# +/.emacs.desktop +/.emacs.desktop.lock +*.elc +auto-save-list +tramp +.\#* + +# Org-mode +.org-id-locations +*_archive +ltximg/** + +# flymake-mode +*_flymake.* + +# eshell files +/eshell/history +/eshell/lastdir + +# elpa packages +/elpa/ + +# reftex files +*.rel + +# AUCTeX auto folder +/auto/ + +# cask packages +.cask/ +dist/ + +# Flycheck +flycheck_*.el + +# server auth directory +/server/ + +# projectiles files +.projectile + +# directory configuration +.dir-locals.el + +# network security +/network-security.data + +### vscode ### +.vscode +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +*.code-workspace + +# End of https://www.toptal.com/developers/gitignore/api/vim,jetbrains,vscode,git,go,tags,backup,test + +# Start by kubecub + +# log +*.log + +# Output of backend and frontend +/_output +/_debug + +# Misc +.DS_Store +# *.env +# .env +dist + +# files used by the developer +.idea.md +.todo.md +.note.md + +# config files, may contain sensitive informatio \ No newline at end of file diff --git a/.golangci.yml b/.golangci.yml new file mode 100644 index 000000000..ba2eed9ba --- /dev/null +++ b/.golangci.yml @@ -0,0 +1,917 @@ + +# options for analysis running +run: + # default concurrency is a available CPU number + concurrency: 4 + + # timeout for analysis, e.g. 30s, 5m, default is 1m + timeout: 5m + + # exit code when at least one issue was found, default is 1 + issues-exit-code: 1 + + # include test files or not, default is true + tests: true + + # list of build tags, all linters use it. Default is empty list. + build-tags: + - mytag + + # which dirs to skip: issues from them won't be reported; + # can use regexp here: generated.*, regexp is applied on full path; + # default value is empty list, but default dirs are skipped independently + # from this option's value (see skip-dirs-use-default). + # "/" will be replaced by current OS file path separator to properly work + # on Windows. + skip-dirs: + - util + - .*~ + - api/swagger/docs + - server/docs + + # default is true. Enables skipping of directories: + # vendor$, third_party$, testdata$, examples$, Godeps$, builtin$ + skip-dirs-use-default: true + + # which files to skip: they will be analyzed, but issues from them + # won't be reported. Default value is empty list, but there is + # no need to include all autogenerated files, we confidently recognize + # autogenerated files. If it's not please let us know. + # "/" will be replaced by current OS file path separator to properly work + # on Windows. + skip-files: + - ".*\\.my\\.go$" + - _test.go + + # by default isn't set. If set we pass it to "go list -mod={option}". From "go help modules": + # If invoked with -mod=readonly, the go command is disallowed from the implicit + # automatic updating of go.mod described above. Instead, it fails when any changes + # to go.mod are needed. This setting is most useful to check that go.mod does + # not need updates, such as in a continuous integration and testing system. + # If invoked with -mod=vendor, the go command assumes that the vendor + # directory holds the correct copies of dependencies and ignores + # the dependency descriptions in go.mod. + #modules-download-mode: release|readonly|vendor + + # Allow multiple parallel golangci-lint instances running. + # If false (default) - golangci-lint acquires file lock on start. + allow-parallel-runners: true + + +# output configuration options +output: + # colored-line-number|line-number|json|tab|checkstyle|code-climate, default is "colored-line-number" + format: colored-line-number + + # print lines of code with issue, default is true + print-issued-lines: true + + # print linter name in the end of issue text, default is true + print-linter-name: true + + # make issues output unique by line, default is true + uniq-by-line: true + + # add a prefix to the output file references; default is no prefix + path-prefix: "" + + # sorts results by: filepath, line and column + sort-results: true + +# all available settings of specific linters +linters-settings: + bidichk: + # The following configurations check for all mentioned invisible unicode + # runes. It can be omitted because all runes are enabled by default. + left-to-right-embedding: true + right-to-left-embedding: true + pop-directional-formatting: true + left-to-right-override: true + right-to-left-override: true + left-to-right-isolate: true + right-to-left-isolate: true + first-strong-isolate: true + pop-directional-isolate: true + dogsled: + # checks assignments with too many blank identifiers; default is 2 + max-blank-identifiers: 2 + dupl: + # tokens count to trigger issue, 150 by default + threshold: 100 + errcheck: + # report about not checking of errors in type assertions: `a := b.(MyStruct)`; + # default is false: such cases aren't reported by default. + check-type-assertions: false + + # report about assignment of errors to blank identifier: `num, _ := strconv.Atoi(numStr)`; + # default is false: such cases aren't reported by default. + check-blank: false + + # [deprecated] comma-separated list of pairs of the form pkg:regex + # the regex is used to ignore names within pkg. (default "fmt:.*"). + # see https://github.com/kisielk/errcheck#the-deprecated-method for details + #ignore: GenMarkdownTree,os:.*,BindPFlags,WriteTo,Help + #ignore: (os\.)?std(out|err)\..*|.*Close|.*Flush|os\.Remove(All)?|.*print(f|ln)?|os\.(Un)?Setenv + + # path to a file containing a list of functions to exclude from checking + # see https://github.com/kisielk/errcheck#excluding-functions for details + #exclude: errcheck.txt + + errorlint: + # Check whether fmt.Errorf uses the %w verb for formatting errors. See the readme for caveats + errorf: true + # Check for plain type assertions and type switches + asserts: true + # Check for plain error comparisons + comparison: true + + exhaustive: + # check switch statements in generated files also + check-generated: false + # indicates that switch statements are to be considered exhaustive if a + # 'default' case is present, even if all enum members aren't listed in the + # switch + default-signifies-exhaustive: false + # enum members matching the supplied regex do not have to be listed in + # switch statements to satisfy exhaustiveness + ignore-enum-members: "" + # consider enums only in package scopes, not in inner scopes + package-scope-only: false + exhaustivestruct: + struct-patterns: + - '*.Test' + - '*.Test2' + - '*.Embedded' + - '*.External' + + # forbidigo: + # # Forbid the following identifiers (identifiers are written using regexp): + # forbid: + # - ^print.*$ + # - 'fmt\.Print.*' + # - fmt.Println.* # too much log noise + # - ginkgo\\.F.* # these are used just for local development + # # Exclude godoc examples from forbidigo checks. Default is true. + # exclude_godoc_examples: false + funlen: + lines: 150 + statements: 50 + gci: + # put imports beginning with prefix after 3rd-party packages; + # only support one prefix + # if not set, use goimports.local-prefixes + prefix: github.com/OpenIMSDK/chat + gocognit: + # minimal code complexity to report, 30 by default (but we recommend 10-20) + min-complexity: 30 + goconst: + # minimal length of string constant, 3 by default + min-len: 3 + # minimal occurrences count to trigger, 3 by default + min-occurrences: 3 + # ignore test files, false by default + ignore-tests: false + # look for existing constants matching the values, true by default + match-constant: true + # search also for duplicated numbers, false by default + numbers: false + # minimum value, only works with goconst.numbers, 3 by default + min: 3 + # maximum value, only works with goconst.numbers, 3 by default + max: 3 + # ignore when constant is not used as function argument, true by default + ignore-calls: true + + gocritic: + # Which checks should be enabled; can't be combined with 'disabled-checks'; + # See https://go-critic.github.io/overview#checks-overview + # To check which checks are enabled run `GL_DEBUG=gocritic golangci-lint run` + # By default list of stable checks is used. + enabled-checks: + #- rangeValCopy + - nestingreduce + - truncatecmp + - unnamedresult + - ruleguard + + # Which checks should be disabled; can't be combined with 'enabled-checks'; default is empty + disabled-checks: + - regexpMust + - ifElseChain + #- exitAfterDefer + + # Enable multiple checks by tags, run `GL_DEBUG=gocritic golangci-lint run` to see all tags and checks. + # Empty list by default. See https://github.com/go-critic/go-critic#usage -> section "Tags". + enabled-tags: + - performance + disabled-tags: + - experimental + + # Settings passed to gocritic. + # The settings key is the name of a supported gocritic checker. + # The list of supported checkers can be find in https://go-critic.github.io/overview. + settings: + captLocal: # must be valid enabled check name + # whether to restrict checker to params only (default true) + paramsOnly: true + elseif: + # whether to skip balanced if-else pairs (default true) + skipBalanced: true + hugeParam: + # size in bytes that makes the warning trigger (default 80) + sizeThreshold: 80 + nestingReduce: + # min number of statements inside a branch to trigger a warning (default 5) + bodyWidth: 5 + rangeExprCopy: + # size in bytes that makes the warning trigger (default 512) + sizeThreshold: 512 + # whether to check test functions (default true) + skipTestFuncs: true + rangeValCopy: + # size in bytes that makes the warning trigger (default 128) + sizeThreshold: 32 + # whether to check test functions (default true) + skipTestFuncs: true + ruleguard: + # path to a gorules file for the ruleguard checker + rules: '' + truncateCmp: + # whether to skip int/uint/uintptr types (default true) + skipArchDependent: true + underef: + # whether to skip (*x).method() calls where x is a pointer receiver (default true) + skipRecvDeref: true + unnamedResult: + # whether to check exported functions + checkExported: true + gocyclo: + # minimal code complexity to report, 30 by default (but we recommend 10-20) + min-complexity: 30 + cyclop: + # the maximal code complexity to report + max-complexity: 50 + # the maximal average package complexity. If it's higher than 0.0 (float) the check is enabled (default 0.0) + package-average: 0.0 + # should ignore tests (default false) + skip-tests: false + godot: + # comments to be checked: `declarations`, `toplevel`, or `all` + scope: declarations + # list of regexps for excluding particular comment lines from check + exclude: + # example: exclude comments which contain numbers + # - '[0-9]+' + # check that each sentence starts with a capital letter + capital: false + godox: + # report any comments starting with keywords, this is useful for TODO or FIXME comments that + # might be left in the code accidentally and should be resolved before merging + keywords: # default keywords are TODO, BUG, and FIXME, these can be overwritten by this setting + #- TODO + - BUG + - FIXME + #- NOTE + - OPTIMIZE # marks code that should be optimized before merging + - HACK # marks hack-arounds that should be removed before merging + gofmt: + # simplify code: gofmt with `-s` option, true by default + simplify: true + + gofumpt: + # Select the Go version to target. The default is `1.18`. + lang-version: "1.20" + + # Choose whether or not to use the extra rules that are disabled + # by default + extra-rules: false + + goheader: + values: + const: + # define here const type values in format k:v, for example: + # COMPANY: MY COMPANY + regexp: + # define here regexp type values, for example + # AUTHOR: .*@mycompany\.com + template: # |- + # put here copyright header template for source code files, for example: + # Note: {{ YEAR }} is a builtin value that returns the year relative to the current machine time. + # + # {{ AUTHOR }} {{ COMPANY }} {{ YEAR }} + # SPDX-License-Identifier: Apache-2.0 + + # Licensed under the Apache License, Version 2.0 (the "License"); + # you may not use this file except in compliance with the License. + # You may obtain a copy of the License at: + + # http://www.apache.org/licenses/LICENSE-2.0 + + # Unless required by applicable law or agreed to in writing, software + # distributed under the License is distributed on an "AS IS" BASIS, + # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + # See the License for the specific language governing permissions and + # limitations under the License. + template-path: + # also as alternative of directive 'template' you may put the path to file with the template source + goimports: + # put imports beginning with prefix after 3rd-party packages; + # it's a comma-separated list of prefixes + local-prefixes: github.com/OpenIMSDK/chat + golint: + # minimal confidence for issues, default is 0.8 + min-confidence: 0.9 + gomnd: + settings: + mnd: + # the list of enabled checks, see https://github.com/tommy-muehle/go-mnd/#checks for description. + checks: argument,case,condition,operation,return,assign + # ignored-numbers: 1000 + # ignored-files: magic_.*.go + # ignored-functions: math.* + gomoddirectives: + # Allow local `replace` directives. Default is false. + replace-local: true + # List of allowed `replace` directives. Default is empty. + replace-allow-list: + - google.golang.org/grpc + + # Allow to not explain why the version has been retracted in the `retract` directives. Default is false. + retract-allow-no-explanation: false + # Forbid the use of the `exclude` directives. Default is false. + exclude-forbidden: false + gomodguard: + allowed: + modules: # List of allowed modules + - gorm.io/gorm + - gorm.io/driver/mysql + - k8s.io/klog + # - gopkg.in/yaml.v2 + domains: # List of allowed module domains + - google.golang.org + - gopkg.in + - golang.org + - github.com + - go.uber.org + - go.etcd.io + blocked: + versions: + - github.com/MakeNowJust/heredoc: + version: "> 2.0.9" + reason: "use the latest version" + local_replace_directives: false # Set to true to raise lint issues for packages that are loaded from a local path via replace directive + + gosec: + # To select a subset of rules to run. + # Available rules: https://github.com/securego/gosec#available-rules + includes: + - G401 + - G306 + - G101 + # To specify a set of rules to explicitly exclude. + # Available rules: https://github.com/securego/gosec#available-rules + excludes: + - G204 + # Exclude generated files + exclude-generated: true + # Filter out the issues with a lower severity than the given value. Valid options are: low, medium, high. + severity: "low" + # Filter out the issues with a lower confidence than the given value. Valid options are: low, medium, high. + confidence: "low" + # To specify the configuration of rules. + # The configuration of rules is not fully documented by gosec: + # https://github.com/securego/gosec#configuration + # https://github.com/securego/gosec/blob/569328eade2ccbad4ce2d0f21ee158ab5356a5cf/rules/rulelist.go#L60-L102 + config: + G306: "0600" + G101: + pattern: "(?i)example" + ignore_entropy: false + entropy_threshold: "80.0" + per_char_threshold: "3.0" + truncate: "32" + + gosimple: + # Select the Go version to target. The default is '1.13'. + go: "1.20" + # https://staticcheck.io/docs/options#checks + checks: [ "all" ] + + govet: + # report about shadowed variables + check-shadowing: true + + # settings per analyzer + settings: + printf: # analyzer name, run `go tool vet help` to see all analyzers + funcs: # run `go tool vet help printf` to see available settings for `printf` analyzer + - (github.com/golangci/golangci-lint/pkg/logutils.Log).Infof + - (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf + - (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf + - (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf + + # enable or disable analyzers by name + enable: + - atomicalign + enable-all: false + disable: + - shadow + disable-all: false + # depguard: + # list-type: blacklist + # include-go-root: false + # packages: + # - github.com/Sirupsen/logrus + # packages-with-error-message: + # # specify an error message to output when a blacklisted package is used + # - github.com/Sirupsen/logrus: "logging is allowed only by logutils.Log" + ifshort: + # Maximum length of variable declaration measured in number of lines, after which linter won't suggest using short syntax. + # Has higher priority than max-decl-chars. + max-decl-lines: 1 + # Maximum length of variable declaration measured in number of characters, after which linter won't suggest using short syntax. + max-decl-chars: 30 + + importas: + # if set to `true`, force to use alias. + no-unaliased: true + # List of aliases + alias: + # using `servingv1` alias for `knative.dev/serving/pkg/apis/serving/v1` package + - pkg: knative.dev/serving/pkg/apis/serving/v1 + alias: servingv1 + # using `autoscalingv1alpha1` alias for `knative.dev/serving/pkg/apis/autoscaling/v1alpha1` package + - pkg: knative.dev/serving/pkg/apis/autoscaling/v1alpha1 + alias: autoscalingv1alpha1 + # You can specify the package path by regular expression, + # and alias by regular expression expansion syntax like below. + # see https://github.com/julz/importas#use-regular-expression for details + - pkg: knative.dev/serving/pkg/apis/(\w+)/(v[\w\d]+) + alias: $1$2 + # using `jwt` alias for `github.com/appleboy/gin-jwt/v2` package + jwt: github.com/appleboy/gin-jwt/v2 + + ireturn: + # ireturn allows using `allow` and `reject` settings at the same time. + # Both settings are lists of the keywords and regular expressions matched to interface or package names. + # keywords: + # - `empty` for `interface{}` + # - `error` for errors + # - `stdlib` for standard library + # - `anon` for anonymous interfaces + + # By default, it allows using errors, empty interfaces, anonymous interfaces, + # and interfaces provided by the standard library. + allow: + - anon + - error + - empty + - stdlib + # You can specify idiomatic endings for interface + - (or|er)$ + + # Reject patterns + reject: + - github.com\/user\/package\/v4\.Type + + lll: + # max line length, lines longer will be reported. Default is 120. + # '\t' is counted as 1 character by default, and can be changed with the tab-width option + line-length: 240 + # tab width in spaces. Default to 1. + tab-width: 4 + maligned: + # print struct with more effective memory layout or not, false by default + suggest-new: true + misspell: + # Correct spellings using locale preferences for US or UK. + # Default is to use a neutral variety of English. + # Setting locale to US will correct the British spelling of 'colour' to 'color'. + locale: US + ignore-words: + - someword + nakedret: + # make an issue if func has more lines of code than this setting and it has naked returns; default is 30 + max-func-lines: 30 + + nestif: + # minimal complexity of if statements to report, 5 by default + min-complexity: 4 + + nilnil: + # By default, nilnil checks all returned types below. + checked-types: + - ptr + - func + - iface + - map + - chan + + nlreturn: + # size of the block (including return statement that is still "OK") + # so no return split required. + block-size: 1 + + nolintlint: + # Disable to ensure that all nolint directives actually have an effect. Default is true. + allow-unused: false + # Disable to ensure that nolint directives don't have a leading space. Default is true. + allow-leading-space: true + # Exclude following linters from requiring an explanation. Default is []. + allow-no-explanation: [ ] + # Enable to require an explanation of nonzero length after each nolint directive. Default is false. + require-explanation: false + # Enable to require nolint directives to mention the specific linter being suppressed. Default is false. + require-specific: true + + prealloc: + # XXX: we don't recommend using this linter before doing performance profiling. + # For most programs usage of prealloc will be a premature optimization. + + # Report preallocation suggestions only on simple loops that have no returns/breaks/continues/gotos in them. + # True by default. + simple: true + range-loops: true # Report preallocation suggestions on range loops, true by default + for-loops: false # Report preallocation suggestions on for loops, false by default + + promlinter: + # Promlinter cannot infer all metrics name in static analysis. + # Enable strict mode will also include the errors caused by failing to parse the args. + strict: false + # Please refer to https://github.com/yeya24/promlinter#usage for detailed usage. + disabled-linters: + # - "Help" + # - "MetricUnits" + # - "Counter" + # - "HistogramSummaryReserved" + # - "MetricTypeInName" + # - "ReservedChars" + # - "CamelCase" + # - "lintUnitAbbreviations" + + predeclared: + # comma-separated list of predeclared identifiers to not report on + ignore: "" + # include method names and field names (i.e., qualified names) in checks + q: false + rowserrcheck: + packages: + - github.com/jmoiron/sqlx + revive: + # see https://github.com/mgechev/revive#available-rules for details. + ignore-generated-header: true + severity: warning + rules: + - name: indent-error-flow + severity: warning + staticcheck: + # Select the Go version to target. The default is '1.13'. + go: "1.16" + # https://staticcheck.io/docs/options#checks + checks: [ "all" ] + + stylecheck: + # Select the Go version to target. The default is '1.13'. + go: "1.16" + + # https://staticcheck.io/docs/options#checks + checks: [ "all", "-ST1000", "-ST1003", "-ST1016", "-ST1020", "-ST1021", "-ST1022" ] + # https://staticcheck.io/docs/options#dot_import_whitelist + dot-import-whitelist: + - fmt + # https://staticcheck.io/docs/options#initialisms + initialisms: [ "ACL", "API", "ASCII", "CPU", "CSS", "DNS", "EOF", "GUID", "HTML", "HTTP", "HTTPS", "ID", "IP", "JSON", "QPS", "RAM", "RPC", "SLA", "SMTP", "SQL", "SSH", "TCP", "TLS", "TTL", "UDP", "UI", "GID", "UID", "UUID", "URI", "URL", "UTF8", "VM", "XML", "XMPP", "XSRF", "XSS" ] + # https://staticcheck.io/docs/options#http_status_code_whitelist + http-status-code-whitelist: [ "200", "400", "404", "500" ] + + + tagliatelle: + # check the struck tag name case + case: + # use the struct field name to check the name of the struct tag + use-field-name: true + rules: + # any struct tag type can be used. + # support string case: `camel`, `pascal`, `kebab`, `snake`, `goCamel`, `goPascal`, `goKebab`, `goSnake`, `upper`, `lower` + json: camel + yaml: camel + xml: camel + bson: camel + avro: snake + mapstructure: kebab + + testpackage: + # regexp pattern to skip files + skip-regexp: (id|export|internal)_test\.go + thelper: + # The following configurations enable all checks. It can be omitted because all checks are enabled by default. + # You can enable only required checks deleting unnecessary checks. + test: + first: true + name: true + begin: true + benchmark: + first: true + name: true + begin: true + tb: + first: true + name: true + begin: true + + tenv: + # The option `all` will run against whole test files (`_test.go`) regardless of method/function signatures. + # By default, only methods that take `*testing.T`, `*testing.B`, and `testing.TB` as arguments are checked. + all: false + + unparam: + # Inspect exported functions, default is false. Set to true if no external program/library imports your code. + # XXX: if you enable this setting, unparam will report a lot of false-positives in text editors: + # if it's called for subdir of a project it can't find external interfaces. All text editor integrations + # with golangci-lint call it on a directory with the changed file. + check-exported: false + unused: + # treat code as a program (not a library) and report unused exported identifiers; default is false. + # XXX: if you enable this setting, unused will report a lot of false-positives in text editors: + # if it's called for subdir of a project it can't find funcs usages. All text editor integrations + # with golangci-lint call it on a directory with the changed file. + check-exported: false + whitespace: + multi-if: false # Enforces newlines (or comments) after every multi-line if statement + multi-func: false # Enforces newlines (or comments) after every multi-line function signature + + wrapcheck: + # An array of strings that specify substrings of signatures to ignore. + # If this set, it will override the default set of ignored signatures. + # See https://github.com/tomarrell/wrapcheck#configuration for more information. + ignoreSigs: + - .Errorf( + - errors.New( + - errors.Unwrap( + - .Wrap( + - .Wrapf( + - .WithMessage( + - .WithMessagef( + - .WithStack( + ignorePackageGlobs: + - encoding/* + - github.com/pkg/* + + wsl: + # If true append is only allowed to be cuddled if appending value is + # matching variables, fields or types on line above. Default is true. + strict-append: true + # Allow calls and assignments to be cuddled as long as the lines have any + # matching variables, fields or types. Default is true. + allow-assign-and-call: true + # Allow assignments to be cuddled with anything. Default is false. + allow-assign-and-anything: false + # Allow multiline assignments to be cuddled. Default is true. + allow-multiline-assign: true + # Allow declarations (var) to be cuddled. + allow-cuddle-declarations: false + # Allow trailing comments in ending of blocks + allow-trailing-comment: false + # Force newlines in end of case at this limit (0 = never). + force-case-trailing-whitespace: 0 + # Force cuddling of err checks with err var assignment + force-err-cuddling: false + # Allow leading comments to be separated with empty liens + allow-separated-leading-comment: false + makezero: + # Allow only slices initialized with a length of zero. Default is false. + always: false + + + # The custom section can be used to define linter plugins to be loaded at runtime. See README doc + # for more info. + #custom: + # Each custom linter should have a unique name. + #example: + # The path to the plugin *.so. Can be absolute or local. Required for each custom linter + #path: /path/to/example.so + # The description of the linter. Optional, just for documentation purposes. + #description: This is an example usage of a plugin linter. + # Intended to point to the repo location of the linter. Optional, just for documentation purposes. + #original-url: github.com/golangci/example-linter + +linters: + # please, do not use `enable-all`: it's deprecated and will be removed soon. + # inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint + # enable-all: true + disable-all: true + enable: + - typecheck + - asciicheck + - bodyclose + - cyclop + - deadcode + # - depguard + - dogsled + - dupl + - durationcheck + - errcheck + - errorlint + - exhaustive + - exportloopref + # - forbidigo + - funlen + # - gci + # - gochecknoinits + - gocognit + - goconst + - gocyclo + - godot + - godox + - gofmt + - gofumpt + - goheader + - goimports + - gomoddirectives + - gomodguard + - goprintffuncname + - gosec + - gosimple + - govet + - ifshort + - importas + - ineffassign + - lll + - makezero + - misspell + - nakedret + - nestif + - nilerr + - nlreturn + - noctx + - nolintlint + - paralleltest + - prealloc + - predeclared + - promlinter + - revive + - rowserrcheck + - sqlclosecheck + - staticcheck + - structcheck + - stylecheck + - thelper + - tparallel + - unconvert + - unparam + - unused + - varcheck + - wastedassign + - whitespace + - bidichk + - wastedassign + - golint + - execinquery + - nosprintfhostport + - grouper + - decorder + - errchkjson + - maintidx + #- containedctx + #- tagliatelle + #- nonamedreturns + #- nilnil + #- tenv + #- varnamelen + #- contextcheck + #- errname + #- ForceTypeAssert + #- nilassign + fast: false + +issues: + # List of regexps of issue texts to exclude, empty list by default. + # But independently from this option we use default exclude patterns, + # it can be disabled by `exclude-use-default: false`. To list all + # excluded by default patterns execute `golangci-lint run --help` + exclude: + - tools/.* + - test/.* + - third_party/.* + + # Excluding configuration per-path, per-linter, per-text and per-source + exclude-rules: + - linters: + - golint + path: (internal/api/.*)\.go # exclude golint for internal/api/... files + + - linters: + - revive + path: (log/.*)\.go + + - linters: + - wrapcheck + path: (cmd/.*|pkg/.*)\.go + + - linters: + - typecheck + #path: (pkg/storage/.*)\.go + path: (internal/.*|pkg/.*)\.go + + - path: (cmd/.*|test/.*|tools/.*|internal/pump/pumps/.*)\.go + linters: + - forbidigo + + - path: (cmd/[a-z]*/.*|store/.*)\.go + linters: + - dupl + + - linters: + - gocritic + text: (hugeParam:|rangeValCopy:) + + - path: (cmd/[a-z]*/.*)\.go + linters: + - lll + + - path: (validator/.*|code/.*|validator/.*|watcher/watcher/.*) + linters: + - gochecknoinits + + - path: (internal/.*/options|internal/pump|pkg/log/options.go|internal/authzserver|tools/) + linters: + - tagliatelle + + - path: (pkg/app/.*)\.go + linters: + - deadcode + - unused + - varcheck + - forbidigo + + # Exclude some staticcheck messages + - linters: + - staticcheck + text: "SA9003:" + + # Exclude lll issues for long lines with go:generate + - linters: + - lll + source: "^//go:generate " + + # Independently from option `exclude` we use default exclude patterns, + # it can be disabled by this option. To list all + # excluded by default patterns execute `golangci-lint run --help`. + # Default value for this option is true. + exclude-use-default: true + + # The default value is false. If set to true exclude and exclude-rules + # regular expressions become case sensitive. + exclude-case-sensitive: false + + # The list of ids of default excludes to include or disable. By default it's empty. + include: + - EXC0002 # disable excluding of issues about comments from golint + + # Maximum issues count per one linter. Set to 0 to disable. Default is 50. + max-issues-per-linter: 0 + + # Maximum count of issues with the same text. Set to 0 to disable. Default is 3. + max-same-issues: 0 + + # Show only new issues: if there are unstaged changes or untracked files, + # only those changes are analyzed, else only changes in HEAD~ are analyzed. + # It's a super-useful option for integration of golangci-lint into existing + # large codebase. It's not practical to fix all existing issues at the moment + # of integration: much better don't allow issues in new code. + # Default is false. + new: false + + # Show only new issues created after git revision `REV` + # new-from-rev: REV + + # Show only new issues created in git patch with set file path. + #new-from-patch: path/to/patch/file + + # Fix found issues (if it's supported by the linter) + fix: true + +severity: + # Default value is empty string. + # Set the default severity for issues. If severity rules are defined and the issues + # do not match or no severity is provided to the rule this will be the default + # severity applied. Severities should match the supported severity names of the + # selected out format. + # - Code climate: https://docs.codeclimate.com/docs/issues#issue-severity + # - Checkstyle: https://checkstyle.sourceforge.io/property_types.html#severity + # - Github: https://help.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-error-message + default-severity: error + + # The default value is false. + # If set to true severity-rules regular expressions become case sensitive. + case-sensitive: false + + # Default value is empty list. + # When a list of severity rules are provided, severity information will be added to lint + # issues. Severity rules have the same filtering capability as exclude rules except you + # are allowed to specify one matcher per severity rule. + # Only affects out formats that support setting severity information. + rules: + - linters: + - dupl + severity: info \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..c5b7692fb --- /dev/null +++ b/Dockerfile @@ -0,0 +1,26 @@ +FROM ubuntu + +# 设置固定的项目路径 +ENV WORKDIR /chat +ENV CMDDIR $WORKDIR/scripts + +ENV CONFIG_NAME $WORKDIR/config/config.yaml + +# 将可执行文件复制到目标目录 +ADD ./bin/open_im_admin $WORKDIR/bin/open_im_admin +ADD ./bin/open_im_admin_api $WORKDIR/bin/open_im_admin_api +ADD ./bin/open_im_chat $WORKDIR/bin/open_im_chat +ADD ./bin/open_im_chat_api $WORKDIR/bin/open_im_chat_api +ADD ./scripts $WORKDIR/scripts +ADD ./config/config.yaml $WORKDIR/config/config.yaml + +# 创建用于挂载的几个目录,添加可执行权限 +RUN mkdir $WORKDIR/logs && \ + chmod +x $WORKDIR/bin/open_im_admin $WORKDIR/bin/open_im_chat $WORKDIR/bin/open_im_admin_api $WORKDIR/bin/open_im_chat_api +RUN apt-get -qq update \ + && apt-get -qq install -y --no-install-recommends ca-certificates curl + +VOLUME ["/chat/logs","/chat/config","/chat/scripts"] + +WORKDIR $CMDDIR +CMD ["./docker_start_all.sh"] \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 000000000..be3831a02 --- /dev/null +++ b/Makefile @@ -0,0 +1,475 @@ +# Copyright 2023 OpenIM. All rights reserved. +# Use of this source code is governed by a MIT style +# license that can be found in the LICENSE file. + +###################################=> common commands <=############################################# +# ========================== Capture Environment =============================== +# get the repo root and output path +ROOT_PACKAGE=github.com/OpenIM/chat +OUT_DIR=$(REPO_ROOT)/_output +# ============================================================================== + +# define the default goal +# + +SHELL := /bin/bash +DIRS=$(shell ls) +GO=go + +.DEFAULT_GOAL := help + +# include the common makefile +COMMON_SELF_DIR := $(dir $(lastword $(MAKEFILE_LIST))) +# ROOT_DIR: root directory of the code base +ifeq ($(origin ROOT_DIR),undefined) +ROOT_DIR := $(abspath $(shell cd $(COMMON_SELF_DIR)/. && pwd -P)) +endif +# OUTPUT_DIR: The directory where the build output is stored. +ifeq ($(origin OUTPUT_DIR),undefined) +OUTPUT_DIR := $(ROOT_DIR)/_output +$(shell mkdir -p $(OUTPUT_DIR)) +endif + +# BIN_DIR: The directory where the build output is stored. +ifeq ($(origin BIN_DIR),undefined) +BIN_DIR := $(OUTPUT_DIR)/bin +$(shell mkdir -p $(BIN_DIR)) +endif + +ifeq ($(origin TOOLS_DIR),undefined) +TOOLS_DIR := $(OUTPUT_DIR)/tools +$(shell mkdir -p $(TOOLS_DIR)) +endif + +ifeq ($(origin TMP_DIR),undefined) +TMP_DIR := $(OUTPUT_DIR)/tmp +$(shell mkdir -p $(TMP_DIR)) +endif + +ifeq ($(origin VERSION), undefined) +VERSION := $(shell git describe --tags --always --match="v*" --dirty | sed 's/-/./g') #v2.3.3.631.g00abdc9b.dirty +endif + +# Check if the tree is dirty. default to dirty(maybe u should commit?) +GIT_TREE_STATE:="dirty" +ifeq (, $(shell git status --porcelain 2>/dev/null)) + GIT_TREE_STATE="clean" +endif +GIT_COMMIT:=$(shell git rev-parse HEAD) + +IMG ?= openim_chat:latest + +BUILDFILE = "./main.go" +BUILDAPP = "$(OUTPUT_DIR)/" + +# Define the directory you want to copyright +CODE_DIRS := $(ROOT_DIR)/ #$(ROOT_DIR)/pkg $(ROOT_DIR)/core $(ROOT_DIR)/integrationtest $(ROOT_DIR)/lib $(ROOT_DIR)/mock $(ROOT_DIR)/db $(ROOT_DIR)/openapi +FINDS := find $(CODE_DIRS) + +ifndef V +MAKEFLAGS += --no-print-directory +endif + +# The OS must be linux when building docker images +PLATFORMS ?= linux_amd64 linux_arm64 +# The OS can be linux/windows/darwin when building binaries +# PLATFORMS ?= darwin_amd64 windows_amd64 linux_amd64 linux_arm64 + +# Set a specific PLATFORM +ifeq ($(origin PLATFORM), undefined) + ifeq ($(origin GOOS), undefined) + GOOS := $(shell go env GOOS) + endif + ifeq ($(origin GOARCH), undefined) + GOARCH := $(shell go env GOARCH) + endif + PLATFORM := $(GOOS)_$(GOARCH) + # Use linux as the default OS when building images + IMAGE_PLAT := linux_$(GOARCH) +else + GOOS := $(word 1, $(subst _, ,$(PLATFORM))) + GOARCH := $(word 2, $(subst _, ,$(PLATFORM))) + IMAGE_PLAT := $(PLATFORM) +endif + +# Copy githook scripts when execute makefile +# TODO! GIT_FILE_SIZE_LIMIT=42000000 git commit -m "This commit is allowed file sizes up to 42MB" +COPY_GITHOOK:=$(shell cp -f scripts/githooks/* .git/hooks/; chmod +x .git/hooks/*) + +# Linux command settings +FIND := find . ! -path './image/*' ! -path './vendor/*' ! -path './bin/*' +XARGS := xargs -r + +# ============================================================================== +# TODO: License selection +# LICENSE_TEMPLATE ?= $(ROOT_DIR)/scripts/LICENSE/license_templates.txt # MIT License +LICENSE_TEMPLATE ?= $(ROOT_DIR)/scripts/LICENSE/LICENSE_TEMPLATES # Apache License + +# COMMA: Concatenate multiple strings to form a list of strings +COMMA := , +# SPACE: Used to separate strings +SPACE := +# SPACE: Replace multiple consecutive Spaces with a single space +SPACE += + +# ============================================================================== +# Build definition + +GO_SUPPORTED_VERSIONS ?= 1.18|1.19|1.20 +GO_LDFLAGS += -X $(VERSION_PACKAGE).GitVersion=$(VERSION) \ + -X $(VERSION_PACKAGE).GitCommit=$(GIT_COMMIT) \ + -X $(VERSION_PACKAGE).GitTreeState=$(GIT_TREE_STATE) \ + -X $(VERSION_PACKAGE).BuildDate=$(shell date -u +'%Y-%m-%dT%H:%M:%SZ') +ifneq ($(DLV),) + GO_BUILD_FLAGS += -gcflags "all=-N -l" + LDFLAGS = "" +endif +GO_BUILD_FLAGS += -ldflags "$(GO_LDFLAGS)" + +ifeq ($(GOOS),windows) + GO_OUT_EXT := .exe +endif + +ifeq ($(ROOT_PACKAGE),) + $(error the variable ROOT_PACKAGE must be set prior to including golang.mk) +endif + +GOPATH := $(shell go env GOPATH) +ifeq ($(origin GOBIN), undefined) + GOBIN := $(GOPATH)/bin +endif + +COMMANDS ?= $(filter-out %.md, $(wildcard ${ROOT_DIR}/cmd/*)) +BINS ?= $(foreach cmd,${COMMANDS},$(notdir ${cmd})) + +ifeq (${COMMANDS},) + $(error Could not determine COMMANDS, set ROOT_DIR or run in source dir) +endif +ifeq (${BINS},) + $(error Could not determine BINS, set ROOT_DIR or run in source dir) +endif + +EXCLUDE_TESTS=github.com/OpenIMSDK/chat/test + +# ============================================================================== +# Build + +## all: Build all the necessary targets. +.PHONY: all +all: copyright-verify build # tidy lint cover + +## build: Build binaries by default. +.PHONY: build +build: go.build.verify $(addprefix go.build., $(addprefix $(PLATFORM)., $(BINS))) + +.PHONY: build.% +build.%: + @echo "$(shell go version)" + @echo "===========> Building binary $(BUILDAPP) *[Git Info]: $(VERSION)-$(GIT_COMMIT)" + @export CGO_ENABLED=0 && GOOS=linux go build -o $(BUILDAPP)/$*/ -ldflags '-s -w' $*/example/$(BUILDFILE) + +.PHONY: go.build.verify +go.build.verify: +ifneq ($(shell $(GO) version | grep -q -E '\bgo($(GO_SUPPORTED_VERSIONS))\b' && echo 0 || echo 1), 0) + $(error unsupported go version. Please make install one of the following supported version: '$(GO_SUPPORTED_VERSIONS)') +endif + +## go.build: Build the binary file of the specified platform. +.PHONY: go.build.% +go.build.%: + $(eval COMMAND := $(word 2,$(subst ., ,$*))) + $(eval PLATFORM := $(word 1,$(subst ., ,$*))) + $(eval OS := $(word 1,$(subst _, ,$(PLATFORM)))) + $(eval ARCH := $(word 2,$(subst _, ,$(PLATFORM)))) + @echo "=====> COMMAND=$(COMMAND)" + @echo "=====> PLATFORM=$(PLATFORM)" + @echo "=====> BIN_DIR=$(BIN_DIR)" + @echo "===========> Building binary $(COMMAND) $(VERSION) for $(OS)_$(ARCH)" + @mkdir -p $(BIN_DIR)/platforms/$(OS)/$(ARCH) + @if [ "$(COMMAND)" = "rpc" ] || [ "$(COMMAND)" = "api" ]; then \ + for d in $(wildcard $(ROOT_DIR)/cmd/$(COMMAND)/*/); do \ + cd $$d && CGO_ENABLED=0 GOOS=$(OS) GOARCH=$(ARCH) $(GO) build $(GO_BUILD_FLAGS) -o \ + $(BIN_DIR)/platforms/$(OS)/$(ARCH)/$$(basename $$d)$(GO_OUT_EXT) .; \ + done; \ + else \ + @CGO_ENABLED=0 GOOS=$(OS) GOARCH=$(ARCH) $(GO) build $(GO_BUILD_FLAGS) -o \ + $(BIN_DIR)/platforms/$(OS)/$(ARCH)/$(COMMAND)$(GO_OUT_EXT) $(ROOT_PACKAGE)/cmd/$(COMMAND)/main.go; \ + fi + +## build-multiarch: Build binaries for multiple platforms. +.PHONY: build-multiarch +build-multiarch: go.build.verify $(foreach p,$(PLATFORMS),$(addprefix go.build., $(addprefix $(p)., $(BINS)))) +# ============================================================================== +# Targets +.PHONY: release +release: release.verify release.ensure-tag + @scripts/release.sh + +.PHONY: install.gsemver +release.verify: install.git-chglog install.github-release install.coscmd + +.PHONY: release.tag +release.tag: install.gsemver release.ensure-tag + @git push origin `git describe --tags --abbrev=0` + +.PHONY: release.ensure-tag +release.ensure-tag: install.gsemver + @scripts/ensure_tag.sh + +## tidy: tidy go.mod +.PHONY: tidy +tidy: + @$(GO) mod tidy + +## style: Code style -> fmt,vet,lint +.PHONY: style +style: fmt vet lint + +## fmt: Run go fmt against code. +.PHONY: fmt +fmt: + @$(GO) fmt ./... + +## vet: Run go vet against code. +.PHONY: vet +vet: + @$(GO) vet ./... + +## generate: Run go generate against code. +.PHONY: generate +generate: + @$(GO) generate ./... + +## lint: Run go lint against code. +.PHONY: lint +lint: tools.verify.golangci-lint + @echo "===========> Run golangci to lint source codes" + @$(TOOLS_DIR)/golangci-lint run -c $(ROOT_DIR)/.golangci.yml $(ROOT_DIR)/... + +## test: Run unit test +.PHONY: test +test: + @$(GO) test ./... + +## cover: Run unit test with coverage. +.PHONY: cover +cover: test + @$(GO) test -cover + +## docker-build: Build docker image with the manager. +.PHONY: docker-build +docker-build: + docker build -t ${IMG} . + +## docker-push: Push docker image with the manager. +.PHONY: docker-push +docker-push: + docker push ${IMG} + +## docker-buildx-push: Push docker image with the manager using buildx. +.PHONY: docker-buildx-push +docker-buildx-push: + docker buildx build --platform linux/arm64,linux/amd64 -t ${IMG} . --push + +## copyright-verify: Validate boilerplate headers for assign files. +.PHONY: copyright-verify +copyright-verify: tools.verify.addlicense copyright-add + @echo "===========> Validate boilerplate headers for assign files starting in the $(ROOT_DIR) directory" + @$(TOOLS_DIR)/addlicense -v -check -ignore **/test/** -f $(LICENSE_TEMPLATE) $(CODE_DIRS) + @echo "===========> End of boilerplate headers check..." + +## copyright-add: Add the boilerplate headers for all files. +.PHONY: copyright-add +copyright-add: tools.verify.addlicense + @echo "===========> Adding $(LICENSE_TEMPLATE) the boilerplate headers for all files" + @$(TOOLS_DIR)/addlicense -y $(shell date +"%Y") -v -c "OpenIM open source community." -f $(LICENSE_TEMPLATE) $(CODE_DIRS) + @echo "===========> End the copyright is added..." + +## clean: Clean all builds. +.PHONY: clean +clean: + @echo "===========> Cleaning all builds TMP_DIR($(TMP_DIR)) AND BIN_DIR($(BIN_DIR))" + @-rm -vrf $(TMP_DIR) $(BIN_DIR) + @echo "===========> End clean..." + +## help: Show this help info. +.PHONY: help +help: Makefile + @printf "\n\033[1mUsage: make ...\033[0m\n\n\\033[1mTargets:\\033[0m\n\n" + @sed -n 's/^##//p' $< | awk -F':' '{printf "\033[36m%-28s\033[0m %s\n", $$1, $$2}' | sed -e 's/^/ /' + +######################################=> common tools<= ############################################ +# tools + +BUILD_TOOLS ?= go-gitlint golangci-lint goimports addlicense deepcopy-gen conversion-gen ginkgo go-junit-report + +## tools.verify.%: Check if a tool is installed and install it +.PHONY: tools.verify.% +tools.verify.%: + @echo "===========> Verifying $* is installed" + @if [ ! -f $(TOOLS_DIR)/$* ]; then GOBIN=$(TOOLS_DIR) $(MAKE) tools.install.$*; fi + @echo "===========> $* is install in $(TOOLS_DIR)/$*" + +# tools: Install a must tools +.PHONY: tools +tools: $(addprefix tools.verify., $(BUILD_TOOLS)) + +# tools.install.%: Install a single tool in $GOBIN/ +.PHONY: tools.install.% +tools.install.%: + @echo "===========> Installing $,The default installation path is $(GOBIN)/$*" + @$(MAKE) install.$* + +.PHONY: install.golangci-lint +install.golangci-lint: + @$(GO) install github.com/golangci/golangci-lint/cmd/golangci-lint@latest + +.PHONY: install.goimports +install.goimports: + @$(GO) install golang.org/x/tools/cmd/goimports@latest + +.PHONY: install.addlicense +install.addlicense: + @$(GO) install github.com/google/addlicense@latest + +.PHONY: install.deepcopy-gen +install.deepcopy-gen: + @$(GO) install k8s.io/code-generator/cmd/deepcopy-gen@latest + +.PHONY: install.conversion-gen +install.conversion-gen: + @$(GO) install k8s.io/code-generator/cmd/conversion-gen@latest + +.PHONY: install.ginkgo +install.ginkgo: + @$(GO) install github.com/onsi/ginkgo/ginkgo@v1.16.2 + +.PHONY: install.go-gitlint +# wget -P _output/tools/ https://openim-1306374445.cos.ap-guangzhou.myqcloud.com/openim/tools/go-gitlint +# go install github.com/antham/go-gitlint/cmd/gitlint@latest +install.go-gitlint: + @wget -q https://openim-1306374445.cos.ap-guangzhou.myqcloud.com/openim/tools/go-gitlint -O ${TOOLS_DIR}/go-gitlint + @chmod +x ${TOOLS_DIR}/go-gitlint + +.PHONY: install.go-junit-report +install.go-junit-report: + @$(GO) install github.com/jstemmer/go-junit-report@latest + +# ============================================================================== +# Tools that might be used include go gvm, cos +# + +## install.kube-score: Install kube-score, used to check kubernetes yaml files +.PHONY: install.kube-score +install.kube-score: + @$(GO) install github.com/zegl/kube-score/cmd/kube-score@latest + +## install.kubeconform: Install kubeconform, used to check kubernetes yaml files +.PHONY: install.kubeconform +install.kubeconform: + @$(GO) install github.com/yannh/kubeconform/cmd/kubeconform@latest + +## install.gsemver: Install gsemver, used to generate semver +.PHONY: install.gsemver +install.gsemver: + @$(GO) install github.com/arnaud-deprez/gsemver@latest + +## install.git-chglog: Install git-chglog, used to generate changelog +.PHONY: install.git-chglog +install.git-chglog: + @$(GO) install github.com/git-chglog/git-chglog/cmd/git-chglog@latest + +## install.github-release: Install github-release, used to create github release +.PHONY: install.github-release +install.github-release: + @$(GO) install github.com/github-release/github-release@latest + +## install.coscli: Install coscli, used to upload files to cos +# example: ./coscli cp/sync -r /root/workspaces/kubecub/chat/ cos://kubecub-1306374445/code/ -e cos.ap-hongkong.myqcloud.com +# https://cloud.tencent.com/document/product/436/71763 +# kubecub/* +# - code/ +# - docs/ +# - images/ +# - scripts/ +.PHONY: install.coscli +install.coscli: + @wget -q https://github.com/tencentyun/coscli/releases/download/v0.13.0-beta/coscli-linux -O ${TOOLS_DIR}/coscli + @chmod +x ${TOOLS_DIR}/coscli + +## install.coscmd: Install coscmd, used to upload files to cos +.PHONY: install.coscmd +install.coscmd: + @if which pip &>/dev/null; then pip install coscmd; else pip3 install coscmd; fi + +## install.delve: Install delve, used to debug go program +.PHONY: install.delve +install.delve: + @$(GO) install github.com/go-delve/delve/cmd/dlv@latest + +## install.air: Install air, used to hot reload go program +.PHONY: install.air +install.air: + @$(GO) install github.com/cosmtrek/air@latest + +## install.gvm: Install gvm, gvm is a Go version manager, built on top of the official go tool. +.PHONY: install.gvm +install.gvm: + @echo "===========> Installing gvm,The default installation path is ~/.gvm/scripts/gvm" + @bash < <(curl -s -S -L https://raw.gitee.com/moovweb/gvm/master/binscripts/gvm-installer) + @$(shell source /root/.gvm/scripts/gvm) + +## install.golines: Install golines, used to format long lines +.PHONY: install.golines +install.golines: + @$(GO) install github.com/segmentio/golines@latest + +## install.go-mod-outdated: Install go-mod-outdated, used to check outdated dependencies +.PHONY: install.go-mod-outdated +install.go-mod-outdated: + @$(GO) install github.com/psampaz/go-mod-outdated@latest + +## install.mockgen: Install mockgen, used to generate mock functions +.PHONY: install.mockgen +install.mockgen: + @$(GO) install github.com/golang/mock/mockgen@latest + +## install.gotests: Install gotests, used to generate test functions +.PHONY: install.gotests +install.gotests: + @$(GO) install github.com/cweill/gotests/gotests@latest + +## install.protoc-gen-go: Install protoc-gen-go, used to generate go source files from protobuf files +.PHONY: install.protoc-gen-go +install.protoc-gen-go: + @$(GO) install github.com/golang/protobuf/protoc-gen-go@latest + +## install.cfssl: Install cfssl, used to generate certificates +.PHONY: install.cfssl +install.cfssl: + @$(ROOT_DIR)/scripts/install/install.sh OpenIM::install::install_cfssl + +## install.depth: Install depth, used to check dependency tree +.PHONY: install.depth +install.depth: + @$(GO) install github.com/KyleBanks/depth/cmd/depth@latest + +## install.go-callvis: Install go-callvis, used to visualize call graph +.PHONY: install.go-callvis +install.go-callvis: + @$(GO) install github.com/ofabry/go-callvis@latest + +## install.gothanks: Install gothanks, used to thank go dependencies +.PHONY: install.gothanks +install.gothanks: + @$(GO) install github.com/psampaz/gothanks@latest + +## install.richgo: Install richgo +.PHONY: install.richgo +install.richgo: + @$(GO) install github.com/kyoh86/richgo@latest + +## install.rts: Install rts +.PHONY: install.rts +install.rts: + @$(GO) install github.com/galeone/rts/cmd/rts@latest \ No newline at end of file diff --git a/README.md b/README.md index 246075af1..e2f020a54 100644 --- a/README.md +++ b/README.md @@ -2,33 +2,32 @@ ## 修改配置项 -参考config/config.yaml的配置说明,重点关注与DB相关的配置项,以保持和IM一致。 +参考config/config.yaml的配置说明 ## 编译 ``` -cd script -./batch_build_all_service.sh +cd scripts +./build_all_service.sh ``` ## 启动 ``` - cd script + cd scripts ./start_all.sh ``` ## 检测 ``` -cd script +cd scripts ./check_all.sh ``` ## 停止 ``` -cd script +cd scripts ./stop_all.sh ``` - diff --git a/cmd/api/admin/Makefile b/cmd/api/admin_api/Makefile similarity index 100% rename from cmd/api/admin/Makefile rename to cmd/api/admin_api/Makefile diff --git a/cmd/api/admin/main.go b/cmd/api/admin_api/main.go similarity index 67% rename from cmd/api/admin/main.go rename to cmd/api/admin_api/main.go index 405df56aa..a57c4777a 100644 --- a/cmd/api/admin/main.go +++ b/cmd/api/admin_api/main.go @@ -1,7 +1,26 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package main import ( "flag" + "math/rand" + "net" + "strconv" + "time" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/mw" openKeeper "github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry/zookeeper" @@ -9,10 +28,6 @@ import ( "github.com/OpenIMSDK/chat/pkg/common/config" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" - "math/rand" - "net" - "strconv" - "time" "github.com/gin-gonic/gin" ) @@ -31,6 +46,10 @@ func main() { if err != nil { panic(err) } + + if err := zk.CreateRpcRootNodes([]string{config.Config.RpcRegisterName.OpenImAdminName, config.Config.RpcRegisterName.OpenImChatName}); err != nil { + panic(err) + } zk.AddOption(mw.GrpcClient(), grpc.WithTransportCredentials(insecure.NewCredentials())) // 默认RPC中间件 engine := gin.Default() engine.Use(mw.CorsHandler(), mw.GinParseOperationID()) diff --git a/cmd/api/chat/Makefile b/cmd/api/chat_api/Makefile similarity index 100% rename from cmd/api/chat/Makefile rename to cmd/api/chat_api/Makefile diff --git a/cmd/api/chat/main.go b/cmd/api/chat_api/main.go similarity index 67% rename from cmd/api/chat/main.go rename to cmd/api/chat_api/main.go index c7e4191a3..462a2640f 100644 --- a/cmd/api/chat/main.go +++ b/cmd/api/chat_api/main.go @@ -1,7 +1,26 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package main import ( "flag" + "math/rand" + "net" + "strconv" + "time" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/mw" openKeeper "github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry/zookeeper" @@ -9,10 +28,6 @@ import ( "github.com/OpenIMSDK/chat/pkg/common/config" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" - "math/rand" - "net" - "strconv" - "time" "github.com/gin-gonic/gin" ) @@ -32,6 +47,9 @@ func main() { if err != nil { panic(err) } + if err := zk.CreateRpcRootNodes([]string{config.Config.RpcRegisterName.OpenImAdminName, config.Config.RpcRegisterName.OpenImChatName}); err != nil { + panic(err) + } zk.AddOption(mw.GrpcClient(), grpc.WithTransportCredentials(insecure.NewCredentials())) // 默认RPC中间件 engine := gin.Default() engine.Use(mw.CorsHandler(), mw.GinParseOperationID()) diff --git a/cmd/api/organization/main.go b/cmd/api/organization/main.go new file mode 100644 index 000000000..3fed21547 --- /dev/null +++ b/cmd/api/organization/main.go @@ -0,0 +1,31 @@ +package main + +func main() { + //rand.Seed(time.Now().UnixNano()) + //err := config.InitConfig() + //if err != nil { + // panic(err) + //} + //if err := log.InitFromConfig("organization.log", "organization-api", *config.Config.Log.RemainLogLevel, *config.Config.Log.IsStdout, *config.Config.Log.IsJson, *config.Config.Log.StorageLocation, *config.Config.Log.RemainRotationCount); err != nil { + // panic(err) + //} + //zk, err := openKeeper.NewClient(config.Config.Zookeeper.ZkAddr, config.Config.Zookeeper.Schema, + // openKeeper.WithFreq(time.Hour), openKeeper.WithUserNameAndPassword(config.Config.Zookeeper.UserName, + // config.Config.Zookeeper.Password), openKeeper.WithRoundRobin(), openKeeper.WithTimeout(10), openKeeper.WithLogger(log.NewZkLogger())) + //if err != nil { + // panic(err) + //} + //zk.AddOption(mw.GrpcClient(), grpc.WithTransportCredentials(insecure.NewCredentials())) // 默认RPC中间件 + //engine := gin.Default() + //engine.Use(mw.CorsHandler(), mw.GinParseOperationID()) + //api.NewOrganizationRoute(engine, zk) + // + // + //defaultPorts := config.Config.OrganizationApi.GinPort + //ginPort := flag.Int("port", defaultPorts[0], "get ginServerPort from cmd") + //flag.Parse() + //address := net.JoinHostPort(config.Config.ChatApi.ListenIP, strconv.Itoa(*ginPort)) + //if err := engine.Run(address); err != nil { + // panic(err) + //} +} diff --git a/cmd/rpc/admin/main.go b/cmd/rpc/admin/main.go index 90ae9fab9..72d18570e 100644 --- a/cmd/rpc/admin/main.go +++ b/cmd/rpc/admin/main.go @@ -1,8 +1,23 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package main import ( "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" "github.com/OpenIMSDK/Open-IM-Server/pkg/startrpc" + "github.com/OpenIMSDK/chat/internal/rpc/admin" "github.com/OpenIMSDK/chat/pkg/common/config" ) diff --git a/cmd/rpc/chat/main.go b/cmd/rpc/chat/main.go index 757401175..bfe4d8802 100644 --- a/cmd/rpc/chat/main.go +++ b/cmd/rpc/chat/main.go @@ -1,8 +1,23 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package main import ( "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" "github.com/OpenIMSDK/Open-IM-Server/pkg/startrpc" + "github.com/OpenIMSDK/chat/internal/rpc/chat" "github.com/OpenIMSDK/chat/pkg/common/config" ) diff --git a/cmd/rpc/organization/Makefile b/cmd/rpc/organization/Makefile new file mode 100644 index 000000000..d4e503ec1 --- /dev/null +++ b/cmd/rpc/organization/Makefile @@ -0,0 +1,23 @@ +.PHONY: all build run gotool install clean help + +BINARY_NAME=open_im_organization +BIN_DIR=../../../bin/ + +all: gotool build + +build: + CGO_ENABLED=0 GOOS=linux GOARCH=amd64; go build -ldflags="-w -s" -o ${BINARY_NAME} + +run: + @go run ./ + +gotool: + go fmt ./ + go vet ./ + +install: + make build + mv ${BINARY_NAME} ${BIN_DIR} + +clean: + @if [ -f ${BINARY_NAME} ] ; then rm ${BINARY_NAME} ; fi diff --git a/cmd/rpc/organization/main.go b/cmd/rpc/organization/main.go new file mode 100644 index 000000000..193245660 --- /dev/null +++ b/cmd/rpc/organization/main.go @@ -0,0 +1,21 @@ +package main + +import ( + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" + "github.com/OpenIMSDK/Open-IM-Server/pkg/startrpc" + "github.com/OpenIMSDK/chat/internal/rpc/organization" + "github.com/OpenIMSDK/chat/pkg/common/config" +) + +func main() { + if err := config.InitConfig(); err != nil { + panic(err) + } + if err := log.InitFromConfig("organization.log", "organization-rpc", *config.Config.Log.RemainLogLevel, *config.Config.Log.IsStdout, *config.Config.Log.IsJson, *config.Config.Log.StorageLocation, *config.Config.Log.RemainRotationCount); err != nil { + panic(err) + } + err := startrpc.Start(config.Config.RpcPort.OpenImOrganizationPort[0], config.Config.RpcRegisterName.OpenImOrganizationName, 0, organization.Start) + if err != nil { + panic(err) + } +} diff --git a/config/config.yaml b/config/config.yaml index fbf1a9883..cd2b95628 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -4,50 +4,67 @@ zookeeper: - 127.0.0.1:2181 userName: "" password: "" -chatapi: + +chatApi: openImChatApiPort: [ 10008 ] - listenIP: 0.0.0.0 -adminapi: + listenIP: + +adminApi: openImAdminApiPort: [ 10009 ] - listenIP: 0.0.0.0 -rpcport: + listenIP: + +rpcPort: openImAdminPort: [ 30200 ] openImChatPort: [ 30300 ] -rpcregistername: + openImOrganizationPort: [ 30400 ] +rpcRegisterName: openImAdminName: admin openImChatName: chat + openImOrganizationName: organization + +# 没有配置表示和OpenIM一致 mysql: - # 没有配置代表和openIM保持一致 - # dbMysqlAddress: [ 127.0.0.1:13306 ] #mysql地址 目前仅支持单机,默认即可 - # dbMysqlUserName: root #mysql用户名,建议修改 - # dbMysqlPassword: openIM123 # mysql密码,建议修改 - # dbTableName: eMsg #默认即可 - # dbMsgTableNum: 1 - # dbMaxOpenConns: 100 - # dbMaxIdleConns: 10 - # dbMaxLifeTime: 5 - # logLevel: 4 #1=slient 2=error 3=warn 4=info - # slowThreshold: 500 - dbMysqlDatabaseName: openim_enterprise - -tokenPolicy: - accessSecret: "openIM123" - accessExpire: 86400 - -verifycode: + # address: [ 127.0.0.1:13306 ] #目前仅支持单机 + # username: root #用户名 + # password: openIM123 #密码 + # database: openIM_v2 #不建议修改 + # maxOpenConn: 1000 #最大连接数 + # maxIdleConn: 100 #最大空闲连接数 + # maxLifeTime: 60 #连接可以重复使用的最长时间(秒) + # logLevel: 4 #日志级别 1=slient 2=error 3=warn 4=info + # slowThreshold: 500 #慢语句阈值 (毫秒) + database: openim_enterprise + +# 没有配置表示和OpenIM一致 +#log: +# storageLocation: ../logs/ #存放目录 +# rotationTime: 24 #日志旋转时间 +# remainRotationCount: 2 #日志数量 +# remainLogLevel: 6 #日志级别 6表示全都打印, +# isStdout: false +# isJson: false +# withStack: false + +#secret: "tuoyun" +#tokenPolicy: +# expire: 86400 + +verifyCode: validTime: 300 # 验证码有效时间 validCount: 5 # 验证码有效次数 uintTime: 86400 # 单位时间间隔 maxCount: 10 # 单位时间内最大获取次数 superCode: "666666" # 超级验证码(只有use为空时使用) len: 6 # 验证码长度 - use: "" # 使用的验证码服务(use: "Ali") - Ali: + use: "" # 使用的验证码服务(use: "ali") + ali: endpoint: "dysmsapi.aliyuncs.com" accessKeyId: "" accessKeySecret: "" signName: "" verificationCodeTemplateCode: "" -proxyheader: "" # 获取ip的header 空字符串没有代理 -#proxyheader: "X-Forwarded-For" \ No newline at end of file +# 获取ip的header,没有配置直接获取远程地址 +#proxyHeader: "X-Forwarded-For" + +importTemplate: "template.xlsx" # 批量导入模板 \ No newline at end of file diff --git a/deploy.Dockerfile b/deploy.Dockerfile index c5ab40a2c..d85cd1e47 100644 --- a/deploy.Dockerfile +++ b/deploy.Dockerfile @@ -1,25 +1,23 @@ +# Use an existing docker image as base FROM ubuntu -# 设置固定的项目路径 -ENV WORKDIR /chat -ENV CMDDIR $WORKDIR/script -ENV CONFIG_NAME $WORKDIR/config/config.yaml +# Set work directory +WORKDIR /chat -# 将可执行文件复制到目标目录 -ADD ./bin/open_im_admin $WORKDIR/bin/open_im_admin -ADD ./bin/open_im_admin_api $WORKDIR/bin/open_im_admin_api -ADD ./bin/open_im_chat $WORKDIR/bin/open_im_chat -ADD ./bin/open_im_chat_api $WORKDIR/bin/open_im_chat_api -ADD ./script $WORKDIR/script -ADD ./config/config.yaml $WORKDIR/config/config.yaml +# Copy files from project to the work directory +COPY ./config /chat/config +COPY ./scripts /chat/scripts +COPY ./logs /chat/logs +COPY ./bin /chat/bin -# 创建用于挂载的几个目录,添加可执行权限 -RUN mkdir $WORKDIR/logs && \ - chmod +x $WORKDIR/bin/open_im_admin $WORKDIR/bin/open_im_chat $WORKDIR/bin/open_im_admin_api $WORKDIR/bin/open_im_chat_api -RUN apt-get -qq update \ - && apt-get -qq install -y --no-install-recommends ca-certificates curl +# Make the script executable +RUN chmod +x ./scripts/docker_start_all.sh -VOLUME ["/chat/logs","/chat/config","/chat/script"] +# Create volumes for these directories +VOLUME ["/chat/logs"] -WORKDIR $CMDDIR +WORKDIR /chat/scripts + + +# Run the script when the container starts CMD ["./docker_start_all.sh"] diff --git a/go.mod b/go.mod index 3ffce03b9..83524f80a 100644 --- a/go.mod +++ b/go.mod @@ -2,7 +2,7 @@ module github.com/OpenIMSDK/chat go 1.18 -// go get -u github.com/OpenIMSDK/Open-IM-Server@ver3 +// go get -u github.com/OpenIMSDK/Open-IM-Server@main require ( github.com/OpenIMSDK/open_utils v1.0.8 github.com/gin-gonic/gin v1.9.1 @@ -15,14 +15,14 @@ require ( github.com/pkg/errors v0.9.1 // indirect github.com/sirupsen/logrus v1.9.0 // indirect google.golang.org/grpc v1.55.0 - google.golang.org/protobuf v1.30.0 + google.golang.org/protobuf v1.31.0 gopkg.in/yaml.v3 v3.0.1 gorm.io/driver/mysql v1.3.5 gorm.io/gorm v1.23.8 ) require ( - github.com/OpenIMSDK/Open-IM-Server v1.0.8-0.20230621033912-41023a440474 + github.com/OpenIMSDK/Open-IM-Server v0.0.0-20230705123117-b494c73328c7 github.com/alibabacloud-go/darabonba-openapi v0.2.1 github.com/alibabacloud-go/dysmsapi-20170525/v2 v2.0.18 github.com/alibabacloud-go/tea v1.1.20 @@ -107,13 +107,13 @@ require ( go.uber.org/multierr v1.7.0 // indirect go.uber.org/zap v1.24.0 // indirect golang.org/x/arch v0.3.0 // indirect - golang.org/x/crypto v0.9.0 // indirect + golang.org/x/crypto v0.10.0 // indirect golang.org/x/image v0.3.0 // indirect - golang.org/x/net v0.10.0 // indirect + golang.org/x/net v0.11.0 // indirect golang.org/x/sync v0.1.0 // indirect - golang.org/x/sys v0.8.0 // indirect - golang.org/x/text v0.9.0 // indirect - google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect + golang.org/x/sys v0.9.0 // indirect + golang.org/x/text v0.10.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20230626202813-9b080da550b3 // indirect gopkg.in/ini.v1 v1.66.2 // indirect ) diff --git a/go.sum b/go.sum index 08f440eda..5b0cbaf8b 100644 --- a/go.sum +++ b/go.sum @@ -13,368 +13,32 @@ cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKV cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= -cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= -cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= -cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= -cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= -cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= -cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= -cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= -cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= -cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= -cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= -cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= -cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= -cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= -cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU= -cloud.google.com/go v0.104.0/go.mod h1:OO6xxXdJyvuJPcEPBLN9BJPD+jep5G1+2U5B5gkRYtA= -cloud.google.com/go v0.105.0/go.mod h1:PrLgOJNe5nfE9UMxKxgXj4mD3voiP+YQ6gdt6KMFOKM= -cloud.google.com/go/accessapproval v1.4.0/go.mod h1:zybIuC3KpDOvotz59lFe5qxRZx6C75OtwbisN56xYB4= -cloud.google.com/go/accessapproval v1.5.0/go.mod h1:HFy3tuiGvMdcd/u+Cu5b9NkO1pEICJ46IR82PoUdplw= -cloud.google.com/go/accesscontextmanager v1.3.0/go.mod h1:TgCBehyr5gNMz7ZaH9xubp+CE8dkrszb4oK9CWyvD4o= -cloud.google.com/go/accesscontextmanager v1.4.0/go.mod h1:/Kjh7BBu/Gh83sv+K60vN9QE5NJcd80sU33vIe2IFPE= -cloud.google.com/go/aiplatform v1.22.0/go.mod h1:ig5Nct50bZlzV6NvKaTwmplLLddFx0YReh9WfTO5jKw= -cloud.google.com/go/aiplatform v1.24.0/go.mod h1:67UUvRBKG6GTayHKV8DBv2RtR1t93YRu5B1P3x99mYY= -cloud.google.com/go/analytics v0.11.0/go.mod h1:DjEWCu41bVbYcKyvlws9Er60YE4a//bK6mnhWvQeFNI= -cloud.google.com/go/analytics v0.12.0/go.mod h1:gkfj9h6XRf9+TS4bmuhPEShsh3hH8PAZzm/41OOhQd4= -cloud.google.com/go/apigateway v1.3.0/go.mod h1:89Z8Bhpmxu6AmUxuVRg/ECRGReEdiP3vQtk4Z1J9rJk= -cloud.google.com/go/apigateway v1.4.0/go.mod h1:pHVY9MKGaH9PQ3pJ4YLzoj6U5FUDeDFBllIz7WmzJoc= -cloud.google.com/go/apigeeconnect v1.3.0/go.mod h1:G/AwXFAKo0gIXkPTVfZDd2qA1TxBXJ3MgMRBQkIi9jc= -cloud.google.com/go/apigeeconnect v1.4.0/go.mod h1:kV4NwOKqjvt2JYR0AoIWo2QGfoRtn/pkS3QlHp0Ni04= -cloud.google.com/go/appengine v1.4.0/go.mod h1:CS2NhuBuDXM9f+qscZ6V86m1MIIqPj3WC/UoEuR1Sno= -cloud.google.com/go/appengine v1.5.0/go.mod h1:TfasSozdkFI0zeoxW3PTBLiNqRmzraodCWatWI9Dmak= -cloud.google.com/go/area120 v0.5.0/go.mod h1:DE/n4mp+iqVyvxHN41Vf1CR602GiHQjFPusMFW6bGR4= -cloud.google.com/go/area120 v0.6.0/go.mod h1:39yFJqWVgm0UZqWTOdqkLhjoC7uFfgXRC8g/ZegeAh0= -cloud.google.com/go/artifactregistry v1.6.0/go.mod h1:IYt0oBPSAGYj/kprzsBjZ/4LnG/zOcHyFHjWPCi6SAQ= -cloud.google.com/go/artifactregistry v1.7.0/go.mod h1:mqTOFOnGZx8EtSqK/ZWcsm/4U8B77rbcLP6ruDU2Ixk= -cloud.google.com/go/artifactregistry v1.8.0/go.mod h1:w3GQXkJX8hiKN0v+at4b0qotwijQbYUqF2GWkZzAhC0= -cloud.google.com/go/artifactregistry v1.9.0/go.mod h1:2K2RqvA2CYvAeARHRkLDhMDJ3OXy26h3XW+3/Jh2uYc= -cloud.google.com/go/asset v1.5.0/go.mod h1:5mfs8UvcM5wHhqtSv8J1CtxxaQq3AdBxxQi2jGW/K4o= -cloud.google.com/go/asset v1.7.0/go.mod h1:YbENsRK4+xTiL+Ofoj5Ckf+O17kJtgp3Y3nn4uzZz5s= -cloud.google.com/go/asset v1.8.0/go.mod h1:mUNGKhiqIdbr8X7KNayoYvyc4HbbFO9URsjbytpUaW0= -cloud.google.com/go/asset v1.9.0/go.mod h1:83MOE6jEJBMqFKadM9NLRcs80Gdw76qGuHn8m3h8oHQ= -cloud.google.com/go/asset v1.10.0/go.mod h1:pLz7uokL80qKhzKr4xXGvBQXnzHn5evJAEAtZiIb0wY= -cloud.google.com/go/assuredworkloads v1.5.0/go.mod h1:n8HOZ6pff6re5KYfBXcFvSViQjDwxFkAkmUFffJRbbY= -cloud.google.com/go/assuredworkloads v1.6.0/go.mod h1:yo2YOk37Yc89Rsd5QMVECvjaMKymF9OP+QXWlKXUkXw= -cloud.google.com/go/assuredworkloads v1.7.0/go.mod h1:z/736/oNmtGAyU47reJgGN+KVoYoxeLBoj4XkKYscNI= -cloud.google.com/go/assuredworkloads v1.8.0/go.mod h1:AsX2cqyNCOvEQC8RMPnoc0yEarXQk6WEKkxYfL6kGIo= -cloud.google.com/go/assuredworkloads v1.9.0/go.mod h1:kFuI1P78bplYtT77Tb1hi0FMxM0vVpRC7VVoJC3ZoT0= -cloud.google.com/go/automl v1.5.0/go.mod h1:34EjfoFGMZ5sgJ9EoLsRtdPSNZLcfflJR39VbVNS2M0= -cloud.google.com/go/automl v1.6.0/go.mod h1:ugf8a6Fx+zP0D59WLhqgTDsQI9w07o64uf/Is3Nh5p8= -cloud.google.com/go/automl v1.7.0/go.mod h1:RL9MYCCsJEOmt0Wf3z9uzG0a7adTT1fe+aObgSpkCt8= -cloud.google.com/go/automl v1.8.0/go.mod h1:xWx7G/aPEe/NP+qzYXktoBSDfjO+vnKMGgsApGJJquM= -cloud.google.com/go/baremetalsolution v0.3.0/go.mod h1:XOrocE+pvK1xFfleEnShBlNAXf+j5blPPxrhjKgnIFc= -cloud.google.com/go/baremetalsolution v0.4.0/go.mod h1:BymplhAadOO/eBa7KewQ0Ppg4A4Wplbn+PsFKRLo0uI= -cloud.google.com/go/batch v0.3.0/go.mod h1:TR18ZoAekj1GuirsUsR1ZTKN3FC/4UDnScjT8NXImFE= -cloud.google.com/go/batch v0.4.0/go.mod h1:WZkHnP43R/QCGQsZ+0JyG4i79ranE2u8xvjq/9+STPE= -cloud.google.com/go/beyondcorp v0.2.0/go.mod h1:TB7Bd+EEtcw9PCPQhCJtJGjk/7TC6ckmnSFS+xwTfm4= -cloud.google.com/go/beyondcorp v0.3.0/go.mod h1:E5U5lcrcXMsCuoDNyGrpyTm/hn7ne941Jz2vmksAxW8= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/bigquery v1.42.0/go.mod h1:8dRTJxhtG+vwBKzE5OseQn/hiydoQN3EedCaOdYmxRA= -cloud.google.com/go/bigquery v1.43.0/go.mod h1:ZMQcXHsl+xmU1z36G2jNGZmKp9zNY5BUua5wDgmNCfw= -cloud.google.com/go/billing v1.4.0/go.mod h1:g9IdKBEFlItS8bTtlrZdVLWSSdSyFUZKXNS02zKMOZY= -cloud.google.com/go/billing v1.5.0/go.mod h1:mztb1tBc3QekhjSgmpf/CV4LzWXLzCArwpLmP2Gm88s= -cloud.google.com/go/billing v1.6.0/go.mod h1:WoXzguj+BeHXPbKfNWkqVtDdzORazmCjraY+vrxcyvI= -cloud.google.com/go/billing v1.7.0/go.mod h1:q457N3Hbj9lYwwRbnlD7vUpyjq6u5U1RAOArInEiD5Y= -cloud.google.com/go/binaryauthorization v1.1.0/go.mod h1:xwnoWu3Y84jbuHa0zd526MJYmtnVXn0syOjaJgy4+dM= -cloud.google.com/go/binaryauthorization v1.2.0/go.mod h1:86WKkJHtRcv5ViNABtYMhhNWRrD1Vpi//uKEy7aYEfI= -cloud.google.com/go/binaryauthorization v1.3.0/go.mod h1:lRZbKgjDIIQvzYQS1p99A7/U1JqvqeZg0wiI5tp6tg0= -cloud.google.com/go/binaryauthorization v1.4.0/go.mod h1:tsSPQrBd77VLplV70GUhBf/Zm3FsKmgSqgm4UmiDItk= -cloud.google.com/go/certificatemanager v1.3.0/go.mod h1:n6twGDvcUBFu9uBgt4eYvvf3sQ6My8jADcOVwHmzadg= -cloud.google.com/go/certificatemanager v1.4.0/go.mod h1:vowpercVFyqs8ABSmrdV+GiFf2H/ch3KyudYQEMM590= -cloud.google.com/go/channel v1.8.0/go.mod h1:W5SwCXDJsq/rg3tn3oG0LOxpAo6IMxNa09ngphpSlnk= -cloud.google.com/go/channel v1.9.0/go.mod h1:jcu05W0my9Vx4mt3/rEHpfxc9eKi9XwsdDL8yBMbKUk= -cloud.google.com/go/cloudbuild v1.3.0/go.mod h1:WequR4ULxlqvMsjDEEEFnOG5ZSRSgWOywXYDb1vPE6U= -cloud.google.com/go/cloudbuild v1.4.0/go.mod h1:5Qwa40LHiOXmz3386FrjrYM93rM/hdRr7b53sySrTqA= -cloud.google.com/go/clouddms v1.3.0/go.mod h1:oK6XsCDdW4Ib3jCCBugx+gVjevp2TMXFtgxvPSee3OM= -cloud.google.com/go/clouddms v1.4.0/go.mod h1:Eh7sUGCC+aKry14O1NRljhjyrr0NFC0G2cjwX0cByRk= -cloud.google.com/go/cloudtasks v1.5.0/go.mod h1:fD92REy1x5woxkKEkLdvavGnPJGEn8Uic9nWuLzqCpY= -cloud.google.com/go/cloudtasks v1.6.0/go.mod h1:C6Io+sxuke9/KNRkbQpihnW93SWDU3uXt92nu85HkYI= -cloud.google.com/go/cloudtasks v1.7.0/go.mod h1:ImsfdYWwlWNJbdgPIIGJWC+gemEGTBK/SunNQQNCAb4= -cloud.google.com/go/cloudtasks v1.8.0/go.mod h1:gQXUIwCSOI4yPVK7DgTVFiiP0ZW/eQkydWzwVMdHxrI= -cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= -cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= -cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= -cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz/FMzPu0s= -cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= -cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= -cloud.google.com/go/compute v1.10.0/go.mod h1:ER5CLbMxl90o2jtNbGSbtfOpQKR0t15FOtRsugnLrlU= -cloud.google.com/go/compute v1.12.0/go.mod h1:e8yNOBcBONZU1vJKCvCoDw/4JQsA0dpM4x/6PIIOocU= -cloud.google.com/go/compute v1.12.1/go.mod h1:e8yNOBcBONZU1vJKCvCoDw/4JQsA0dpM4x/6PIIOocU= -cloud.google.com/go/compute/metadata v0.1.0/go.mod h1:Z1VN+bulIf6bt4P/C37K4DyZYZEXYonfTBHHFPO/4UU= -cloud.google.com/go/compute/metadata v0.2.1/go.mod h1:jgHgmJd2RKBGzXqF5LR2EZMGxBkeanZ9wwa75XHJgOM= -cloud.google.com/go/contactcenterinsights v1.3.0/go.mod h1:Eu2oemoePuEFc/xKFPjbTuPSj0fYJcPls9TFlPNnHHY= -cloud.google.com/go/contactcenterinsights v1.4.0/go.mod h1:L2YzkGbPsv+vMQMCADxJoT9YiTTnSEd6fEvCeHTYVck= -cloud.google.com/go/container v1.6.0/go.mod h1:Xazp7GjJSeUYo688S+6J5V+n/t+G5sKBTFkKNudGRxg= -cloud.google.com/go/container v1.7.0/go.mod h1:Dp5AHtmothHGX3DwwIHPgq45Y8KmNsgN3amoYfxVkLo= -cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I= -cloud.google.com/go/containeranalysis v0.6.0/go.mod h1:HEJoiEIu+lEXM+k7+qLCci0h33lX3ZqoYFdmPcoO7s4= -cloud.google.com/go/datacatalog v1.3.0/go.mod h1:g9svFY6tuR+j+hrTw3J2dNcmI0dzmSiyOzm8kpLq0a0= -cloud.google.com/go/datacatalog v1.5.0/go.mod h1:M7GPLNQeLfWqeIm3iuiruhPzkt65+Bx8dAKvScX8jvs= -cloud.google.com/go/datacatalog v1.6.0/go.mod h1:+aEyF8JKg+uXcIdAmmaMUmZ3q1b/lKLtXCmXdnc0lbc= -cloud.google.com/go/datacatalog v1.7.0/go.mod h1:9mEl4AuDYWw81UGc41HonIHH7/sn52H0/tc8f8ZbZIE= -cloud.google.com/go/datacatalog v1.8.0/go.mod h1:KYuoVOv9BM8EYz/4eMFxrr4DUKhGIOXxZoKYF5wdISM= -cloud.google.com/go/dataflow v0.6.0/go.mod h1:9QwV89cGoxjjSR9/r7eFDqqjtvbKxAK2BaYU6PVk9UM= -cloud.google.com/go/dataflow v0.7.0/go.mod h1:PX526vb4ijFMesO1o202EaUmouZKBpjHsTlCtB4parQ= -cloud.google.com/go/dataform v0.3.0/go.mod h1:cj8uNliRlHpa6L3yVhDOBrUXH+BPAO1+KFMQQNSThKo= -cloud.google.com/go/dataform v0.4.0/go.mod h1:fwV6Y4Ty2yIFL89huYlEkwUPtS7YZinZbzzj5S9FzCE= -cloud.google.com/go/dataform v0.5.0/go.mod h1:GFUYRe8IBa2hcomWplodVmUx/iTL0FrsauObOM3Ipr0= -cloud.google.com/go/datafusion v1.4.0/go.mod h1:1Zb6VN+W6ALo85cXnM1IKiPw+yQMKMhB9TsTSRDo/38= -cloud.google.com/go/datafusion v1.5.0/go.mod h1:Kz+l1FGHB0J+4XF2fud96WMmRiq/wj8N9u007vyXZ2w= -cloud.google.com/go/datalabeling v0.5.0/go.mod h1:TGcJ0G2NzcsXSE/97yWjIZO0bXj0KbVlINXMG9ud42I= -cloud.google.com/go/datalabeling v0.6.0/go.mod h1:WqdISuk/+WIGeMkpw/1q7bK/tFEZxsrFJOJdY2bXvTQ= -cloud.google.com/go/dataplex v1.3.0/go.mod h1:hQuRtDg+fCiFgC8j0zV222HvzFQdRd+SVX8gdmFcZzA= -cloud.google.com/go/dataplex v1.4.0/go.mod h1:X51GfLXEMVJ6UN47ESVqvlsRplbLhcsAt0kZCCKsU0A= -cloud.google.com/go/dataproc v1.7.0/go.mod h1:CKAlMjII9H90RXaMpSxQ8EU6dQx6iAYNPcYPOkSbi8s= -cloud.google.com/go/dataproc v1.8.0/go.mod h1:5OW+zNAH0pMpw14JVrPONsxMQYMBqJuzORhIBfBn9uI= -cloud.google.com/go/dataqna v0.5.0/go.mod h1:90Hyk596ft3zUQ8NkFfvICSIfHFh1Bc7C4cK3vbhkeo= -cloud.google.com/go/dataqna v0.6.0/go.mod h1:1lqNpM7rqNLVgWBJyk5NF6Uen2PHym0jtVJonplVsDA= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/datastream v1.2.0/go.mod h1:i/uTP8/fZwgATHS/XFu0TcNUhuA0twZxxQ3EyCUQMwo= -cloud.google.com/go/datastream v1.3.0/go.mod h1:cqlOX8xlyYF/uxhiKn6Hbv6WjwPPuI9W2M9SAXwaLLQ= -cloud.google.com/go/datastream v1.4.0/go.mod h1:h9dpzScPhDTs5noEMQVWP8Wx8AFBRyS0s8KWPx/9r0g= -cloud.google.com/go/datastream v1.5.0/go.mod h1:6TZMMNPwjUqZHBKPQ1wwXpb0d5VDVPl2/XoS5yi88q4= -cloud.google.com/go/deploy v1.4.0/go.mod h1:5Xghikd4VrmMLNaF6FiRFDlHb59VM59YoDQnOUdsH/c= -cloud.google.com/go/deploy v1.5.0/go.mod h1:ffgdD0B89tToyW/U/D2eL0jN2+IEV/3EMuXHA0l4r+s= -cloud.google.com/go/dialogflow v1.15.0/go.mod h1:HbHDWs33WOGJgn6rfzBW1Kv807BE3O1+xGbn59zZWI4= -cloud.google.com/go/dialogflow v1.16.1/go.mod h1:po6LlzGfK+smoSmTBnbkIZY2w8ffjz/RcGSS+sh1el0= -cloud.google.com/go/dialogflow v1.17.0/go.mod h1:YNP09C/kXA1aZdBgC/VtXX74G/TKn7XVCcVumTflA+8= -cloud.google.com/go/dialogflow v1.18.0/go.mod h1:trO7Zu5YdyEuR+BhSNOqJezyFQ3aUzz0njv7sMx/iek= -cloud.google.com/go/dialogflow v1.19.0/go.mod h1:JVmlG1TwykZDtxtTXujec4tQ+D8SBFMoosgy+6Gn0s0= -cloud.google.com/go/dlp v1.6.0/go.mod h1:9eyB2xIhpU0sVwUixfBubDoRwP+GjeUoxxeueZmqvmM= -cloud.google.com/go/dlp v1.7.0/go.mod h1:68ak9vCiMBjbasxeVD17hVPxDEck+ExiHavX8kiHG+Q= -cloud.google.com/go/documentai v1.7.0/go.mod h1:lJvftZB5NRiFSX4moiye1SMxHx0Bc3x1+p9e/RfXYiU= -cloud.google.com/go/documentai v1.8.0/go.mod h1:xGHNEB7CtsnySCNrCFdCyyMz44RhFEEX2Q7UD0c5IhU= -cloud.google.com/go/documentai v1.9.0/go.mod h1:FS5485S8R00U10GhgBC0aNGrJxBP8ZVpEeJ7PQDZd6k= -cloud.google.com/go/documentai v1.10.0/go.mod h1:vod47hKQIPeCfN2QS/jULIvQTugbmdc0ZvxxfQY1bg4= -cloud.google.com/go/domains v0.6.0/go.mod h1:T9Rz3GasrpYk6mEGHh4rymIhjlnIuB4ofT1wTxDeT4Y= -cloud.google.com/go/domains v0.7.0/go.mod h1:PtZeqS1xjnXuRPKE/88Iru/LdfoRyEHYA9nFQf4UKpg= -cloud.google.com/go/edgecontainer v0.1.0/go.mod h1:WgkZ9tp10bFxqO8BLPqv2LlfmQF1X8lZqwW4r1BTajk= -cloud.google.com/go/edgecontainer v0.2.0/go.mod h1:RTmLijy+lGpQ7BXuTDa4C4ssxyXT34NIuHIgKuP4s5w= -cloud.google.com/go/essentialcontacts v1.3.0/go.mod h1:r+OnHa5jfj90qIfZDO/VztSFqbQan7HV75p8sA+mdGI= -cloud.google.com/go/essentialcontacts v1.4.0/go.mod h1:8tRldvHYsmnBCHdFpvU+GL75oWiBKl80BiqlFh9tp+8= -cloud.google.com/go/eventarc v1.7.0/go.mod h1:6ctpF3zTnaQCxUjHUdcfgcA1A2T309+omHZth7gDfmc= -cloud.google.com/go/eventarc v1.8.0/go.mod h1:imbzxkyAU4ubfsaKYdQg04WS1NvncblHEup4kvF+4gw= -cloud.google.com/go/filestore v1.3.0/go.mod h1:+qbvHGvXU1HaKX2nD0WEPo92TP/8AQuCVEBXNY9z0+w= -cloud.google.com/go/filestore v1.4.0/go.mod h1:PaG5oDfo9r224f8OYXURtAsY+Fbyq/bLYoINEK8XQAI= -cloud.google.com/go/functions v1.6.0/go.mod h1:3H1UA3qiIPRWD7PeZKLvHZ9SaQhR26XIJcC0A5GbvAk= -cloud.google.com/go/functions v1.7.0/go.mod h1:+d+QBcWM+RsrgZfV9xo6KfA1GlzJfxcfZcRPEhDDfzg= -cloud.google.com/go/functions v1.8.0/go.mod h1:RTZ4/HsQjIqIYP9a9YPbU+QFoQsAlYgrwOXJWHn1POY= -cloud.google.com/go/functions v1.9.0/go.mod h1:Y+Dz8yGguzO3PpIjhLTbnqV1CWmgQ5UwtlpzoyquQ08= -cloud.google.com/go/gaming v1.5.0/go.mod h1:ol7rGcxP/qHTRQE/RO4bxkXq+Fix0j6D4LFPzYTIrDM= -cloud.google.com/go/gaming v1.6.0/go.mod h1:YMU1GEvA39Qt3zWGyAVA9bpYz/yAhTvaQ1t2sK4KPUA= -cloud.google.com/go/gaming v1.7.0/go.mod h1:LrB8U7MHdGgFG851iHAfqUdLcKBdQ55hzXy9xBJz0+w= -cloud.google.com/go/gaming v1.8.0/go.mod h1:xAqjS8b7jAVW0KFYeRUxngo9My3f33kFmua++Pi+ggM= -cloud.google.com/go/gkebackup v0.2.0/go.mod h1:XKvv/4LfG829/B8B7xRkk8zRrOEbKtEam6yNfuQNH60= -cloud.google.com/go/gkebackup v0.3.0/go.mod h1:n/E671i1aOQvUxT541aTkCwExO/bTer2HDlj4TsBRAo= -cloud.google.com/go/gkeconnect v0.5.0/go.mod h1:c5lsNAg5EwAy7fkqX/+goqFsU1Da/jQFqArp+wGNr/o= -cloud.google.com/go/gkeconnect v0.6.0/go.mod h1:Mln67KyU/sHJEBY8kFZ0xTeyPtzbq9StAVvEULYK16A= -cloud.google.com/go/gkehub v0.9.0/go.mod h1:WYHN6WG8w9bXU0hqNxt8rm5uxnk8IH+lPY9J2TV7BK0= -cloud.google.com/go/gkehub v0.10.0/go.mod h1:UIPwxI0DsrpsVoWpLB0stwKCP+WFVG9+y977wO+hBH0= -cloud.google.com/go/gkemulticloud v0.3.0/go.mod h1:7orzy7O0S+5kq95e4Hpn7RysVA7dPs8W/GgfUtsPbrA= -cloud.google.com/go/gkemulticloud v0.4.0/go.mod h1:E9gxVBnseLWCk24ch+P9+B2CoDFJZTyIgLKSalC7tuI= -cloud.google.com/go/grafeas v0.2.0/go.mod h1:KhxgtF2hb0P191HlY5besjYm6MqTSTj3LSI+M+ByZHc= -cloud.google.com/go/gsuiteaddons v1.3.0/go.mod h1:EUNK/J1lZEZO8yPtykKxLXI6JSVN2rg9bN8SXOa0bgM= -cloud.google.com/go/gsuiteaddons v1.4.0/go.mod h1:rZK5I8hht7u7HxFQcFei0+AtfS9uSushomRlg+3ua1o= -cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= -cloud.google.com/go/iam v0.5.0/go.mod h1:wPU9Vt0P4UmCux7mqtRu6jcpPAb74cP1fh50J3QpkUc= -cloud.google.com/go/iam v0.6.0/go.mod h1:+1AH33ueBne5MzYccyMHtEKqLE4/kJOibtffMHDMFMc= -cloud.google.com/go/iam v0.7.0/go.mod h1:H5Br8wRaDGNc8XP3keLc4unfUUZeyH3Sfl9XpQEYOeg= -cloud.google.com/go/iap v1.4.0/go.mod h1:RGFwRJdihTINIe4wZ2iCP0zF/qu18ZwyKxrhMhygBEc= -cloud.google.com/go/iap v1.5.0/go.mod h1:UH/CGgKd4KyohZL5Pt0jSKE4m3FR51qg6FKQ/z/Ix9A= -cloud.google.com/go/ids v1.1.0/go.mod h1:WIuwCaYVOzHIj2OhN9HAwvW+DBdmUAdcWlFxRl+KubM= -cloud.google.com/go/ids v1.2.0/go.mod h1:5WXvp4n25S0rA/mQWAg1YEEBBq6/s+7ml1RDCW1IrcY= -cloud.google.com/go/iot v1.3.0/go.mod h1:r7RGh2B61+B8oz0AGE+J72AhA0G7tdXItODWsaA2oLs= -cloud.google.com/go/iot v1.4.0/go.mod h1:dIDxPOn0UvNDUMD8Ger7FIaTuvMkj+aGk94RPP0iV+g= -cloud.google.com/go/kms v1.5.0/go.mod h1:QJS2YY0eJGBg3mnDfuaCyLauWwBJiHRboYxJ++1xJNg= -cloud.google.com/go/kms v1.6.0/go.mod h1:Jjy850yySiasBUDi6KFUwUv2n1+o7QZFyuUJg6OgjA0= -cloud.google.com/go/language v1.4.0/go.mod h1:F9dRpNFQmJbkaop6g0JhSBXCNlO90e1KWx5iDdxbWic= -cloud.google.com/go/language v1.6.0/go.mod h1:6dJ8t3B+lUYfStgls25GusK04NLh3eDLQnWM3mdEbhI= -cloud.google.com/go/language v1.7.0/go.mod h1:DJ6dYN/W+SQOjF8e1hLQXMF21AkH2w9wiPzPCJa2MIE= -cloud.google.com/go/language v1.8.0/go.mod h1:qYPVHf7SPoNNiCL2Dr0FfEFNil1qi3pQEyygwpgVKB8= -cloud.google.com/go/lifesciences v0.5.0/go.mod h1:3oIKy8ycWGPUyZDR/8RNnTOYevhaMLqh5vLUXs9zvT8= -cloud.google.com/go/lifesciences v0.6.0/go.mod h1:ddj6tSX/7BOnhxCSd3ZcETvtNr8NZ6t/iPhY2Tyfu08= -cloud.google.com/go/longrunning v0.1.1/go.mod h1:UUFxuDWkv22EuY93jjmDMFT5GPQKeFVJBIF6QlTqdsE= -cloud.google.com/go/longrunning v0.3.0/go.mod h1:qth9Y41RRSUE69rDcOn6DdK3HfQfsUI0YSmW3iIlLJc= -cloud.google.com/go/managedidentities v1.3.0/go.mod h1:UzlW3cBOiPrzucO5qWkNkh0w33KFtBJU281hacNvsdE= -cloud.google.com/go/managedidentities v1.4.0/go.mod h1:NWSBYbEMgqmbZsLIyKvxrYbtqOsxY1ZrGM+9RgDqInM= -cloud.google.com/go/mediatranslation v0.5.0/go.mod h1:jGPUhGTybqsPQn91pNXw0xVHfuJ3leR1wj37oU3y1f4= -cloud.google.com/go/mediatranslation v0.6.0/go.mod h1:hHdBCTYNigsBxshbznuIMFNe5QXEowAuNmmC7h8pu5w= -cloud.google.com/go/memcache v1.4.0/go.mod h1:rTOfiGZtJX1AaFUrOgsMHX5kAzaTQ8azHiuDoTPzNsE= -cloud.google.com/go/memcache v1.5.0/go.mod h1:dk3fCK7dVo0cUU2c36jKb4VqKPS22BTkf81Xq617aWM= -cloud.google.com/go/memcache v1.6.0/go.mod h1:XS5xB0eQZdHtTuTF9Hf8eJkKtR3pVRCcvJwtm68T3rA= -cloud.google.com/go/memcache v1.7.0/go.mod h1:ywMKfjWhNtkQTxrWxCkCFkoPjLHPW6A7WOTVI8xy3LY= -cloud.google.com/go/metastore v1.5.0/go.mod h1:2ZNrDcQwghfdtCwJ33nM0+GrBGlVuh8rakL3vdPY3XY= -cloud.google.com/go/metastore v1.6.0/go.mod h1:6cyQTls8CWXzk45G55x57DVQ9gWg7RiH65+YgPsNh9s= -cloud.google.com/go/metastore v1.7.0/go.mod h1:s45D0B4IlsINu87/AsWiEVYbLaIMeUSoxlKKDqBGFS8= -cloud.google.com/go/metastore v1.8.0/go.mod h1:zHiMc4ZUpBiM7twCIFQmJ9JMEkDSyZS9U12uf7wHqSI= -cloud.google.com/go/monitoring v1.7.0/go.mod h1:HpYse6kkGo//7p6sT0wsIC6IBDET0RhIsnmlA53dvEk= -cloud.google.com/go/monitoring v1.8.0/go.mod h1:E7PtoMJ1kQXWxPjB6mv2fhC5/15jInuulFdYYtlcvT4= -cloud.google.com/go/networkconnectivity v1.4.0/go.mod h1:nOl7YL8odKyAOtzNX73/M5/mGZgqqMeryi6UPZTk/rA= -cloud.google.com/go/networkconnectivity v1.5.0/go.mod h1:3GzqJx7uhtlM3kln0+x5wyFvuVH1pIBJjhCpjzSt75o= -cloud.google.com/go/networkconnectivity v1.6.0/go.mod h1:OJOoEXW+0LAxHh89nXd64uGG+FbQoeH8DtxCHVOMlaM= -cloud.google.com/go/networkconnectivity v1.7.0/go.mod h1:RMuSbkdbPwNMQjB5HBWD5MpTBnNm39iAVpC3TmsExt8= -cloud.google.com/go/networkmanagement v1.4.0/go.mod h1:Q9mdLLRn60AsOrPc8rs8iNV6OHXaGcDdsIQe1ohekq8= -cloud.google.com/go/networkmanagement v1.5.0/go.mod h1:ZnOeZ/evzUdUsnvRt792H0uYEnHQEMaz+REhhzJRcf4= -cloud.google.com/go/networksecurity v0.5.0/go.mod h1:xS6fOCoqpVC5zx15Z/MqkfDwH4+m/61A3ODiDV1xmiQ= -cloud.google.com/go/networksecurity v0.6.0/go.mod h1:Q5fjhTr9WMI5mbpRYEbiexTzROf7ZbDzvzCrNl14nyU= -cloud.google.com/go/notebooks v1.2.0/go.mod h1:9+wtppMfVPUeJ8fIWPOq1UnATHISkGXGqTkxeieQ6UY= -cloud.google.com/go/notebooks v1.3.0/go.mod h1:bFR5lj07DtCPC7YAAJ//vHskFBxA5JzYlH68kXVdk34= -cloud.google.com/go/notebooks v1.4.0/go.mod h1:4QPMngcwmgb6uw7Po99B2xv5ufVoIQ7nOGDyL4P8AgA= -cloud.google.com/go/notebooks v1.5.0/go.mod h1:q8mwhnP9aR8Hpfnrc5iN5IBhrXUy8S2vuYs+kBJ/gu0= -cloud.google.com/go/optimization v1.1.0/go.mod h1:5po+wfvX5AQlPznyVEZjGJTMr4+CAkJf2XSTQOOl9l4= -cloud.google.com/go/optimization v1.2.0/go.mod h1:Lr7SOHdRDENsh+WXVmQhQTrzdu9ybg0NecjHidBq6xs= -cloud.google.com/go/orchestration v1.3.0/go.mod h1:Sj5tq/JpWiB//X/q3Ngwdl5K7B7Y0KZ7bfv0wL6fqVA= -cloud.google.com/go/orchestration v1.4.0/go.mod h1:6W5NLFWs2TlniBphAViZEVhrXRSMgUGDfW7vrWKvsBk= -cloud.google.com/go/orgpolicy v1.4.0/go.mod h1:xrSLIV4RePWmP9P3tBl8S93lTmlAxjm06NSm2UTmKvE= -cloud.google.com/go/orgpolicy v1.5.0/go.mod h1:hZEc5q3wzwXJaKrsx5+Ewg0u1LxJ51nNFlext7Tanwc= -cloud.google.com/go/osconfig v1.7.0/go.mod h1:oVHeCeZELfJP7XLxcBGTMBvRO+1nQ5tFG9VQTmYS2Fs= -cloud.google.com/go/osconfig v1.8.0/go.mod h1:EQqZLu5w5XA7eKizepumcvWx+m8mJUhEwiPqWiZeEdg= -cloud.google.com/go/osconfig v1.9.0/go.mod h1:Yx+IeIZJ3bdWmzbQU4fxNl8xsZ4amB+dygAwFPlvnNo= -cloud.google.com/go/osconfig v1.10.0/go.mod h1:uMhCzqC5I8zfD9zDEAfvgVhDS8oIjySWh+l4WK6GnWw= -cloud.google.com/go/oslogin v1.4.0/go.mod h1:YdgMXWRaElXz/lDk1Na6Fh5orF7gvmJ0FGLIs9LId4E= -cloud.google.com/go/oslogin v1.5.0/go.mod h1:D260Qj11W2qx/HVF29zBg+0fd6YCSjSqLUkY/qEenQU= -cloud.google.com/go/oslogin v1.6.0/go.mod h1:zOJ1O3+dTU8WPlGEkFSh7qeHPPSoxrcMbbK1Nm2iX70= -cloud.google.com/go/oslogin v1.7.0/go.mod h1:e04SN0xO1UNJ1M5GP0vzVBFicIe4O53FOfcixIqTyXo= -cloud.google.com/go/phishingprotection v0.5.0/go.mod h1:Y3HZknsK9bc9dMi+oE8Bim0lczMU6hrX0UpADuMefr0= -cloud.google.com/go/phishingprotection v0.6.0/go.mod h1:9Y3LBLgy0kDTcYET8ZH3bq/7qni15yVUoAxiFxnlSUA= -cloud.google.com/go/policytroubleshooter v1.3.0/go.mod h1:qy0+VwANja+kKrjlQuOzmlvscn4RNsAc0e15GGqfMxg= -cloud.google.com/go/policytroubleshooter v1.4.0/go.mod h1:DZT4BcRw3QoO8ota9xw/LKtPa8lKeCByYeKTIf/vxdE= -cloud.google.com/go/privatecatalog v0.5.0/go.mod h1:XgosMUvvPyxDjAVNDYxJ7wBW8//hLDDYmnsNcMGq1K0= -cloud.google.com/go/privatecatalog v0.6.0/go.mod h1:i/fbkZR0hLN29eEWiiwue8Pb+GforiEIBnV9yrRUOKI= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/recaptchaenterprise v1.3.1/go.mod h1:OdD+q+y4XGeAlxRaMn1Y7/GveP6zmq76byL6tjPE7d4= -cloud.google.com/go/recaptchaenterprise/v2 v2.1.0/go.mod h1:w9yVqajwroDNTfGuhmOjPDN//rZGySaf6PtFVcSCa7o= -cloud.google.com/go/recaptchaenterprise/v2 v2.2.0/go.mod h1:/Zu5jisWGeERrd5HnlS3EUGb/D335f9k51B/FVil0jk= -cloud.google.com/go/recaptchaenterprise/v2 v2.3.0/go.mod h1:O9LwGCjrhGHBQET5CA7dd5NwwNQUErSgEDit1DLNTdo= -cloud.google.com/go/recaptchaenterprise/v2 v2.4.0/go.mod h1:Am3LHfOuBstrLrNCBrlI5sbwx9LBg3te2N6hGvHn2mE= -cloud.google.com/go/recaptchaenterprise/v2 v2.5.0/go.mod h1:O8LzcHXN3rz0j+LBC91jrwI3R+1ZSZEWrfL7XHgNo9U= -cloud.google.com/go/recommendationengine v0.5.0/go.mod h1:E5756pJcVFeVgaQv3WNpImkFP8a+RptV6dDLGPILjvg= -cloud.google.com/go/recommendationengine v0.6.0/go.mod h1:08mq2umu9oIqc7tDy8sx+MNJdLG0fUi3vaSVbztHgJ4= -cloud.google.com/go/recommender v1.5.0/go.mod h1:jdoeiBIVrJe9gQjwd759ecLJbxCDED4A6p+mqoqDvTg= -cloud.google.com/go/recommender v1.6.0/go.mod h1:+yETpm25mcoiECKh9DEScGzIRyDKpZ0cEhWGo+8bo+c= -cloud.google.com/go/recommender v1.7.0/go.mod h1:XLHs/W+T8olwlGOgfQenXBTbIseGclClff6lhFVe9Bs= -cloud.google.com/go/recommender v1.8.0/go.mod h1:PkjXrTT05BFKwxaUxQmtIlrtj0kph108r02ZZQ5FE70= -cloud.google.com/go/redis v1.7.0/go.mod h1:V3x5Jq1jzUcg+UNsRvdmsfuFnit1cfe3Z/PGyq/lm4Y= -cloud.google.com/go/redis v1.8.0/go.mod h1:Fm2szCDavWzBk2cDKxrkmWBqoCiL1+Ctwq7EyqBCA/A= -cloud.google.com/go/redis v1.9.0/go.mod h1:HMYQuajvb2D0LvMgZmLDZW8V5aOC/WxstZHiy4g8OiA= -cloud.google.com/go/redis v1.10.0/go.mod h1:ThJf3mMBQtW18JzGgh41/Wld6vnDDc/F/F35UolRZPM= -cloud.google.com/go/resourcemanager v1.3.0/go.mod h1:bAtrTjZQFJkiWTPDb1WBjzvc6/kifjj4QBYuKCCoqKA= -cloud.google.com/go/resourcemanager v1.4.0/go.mod h1:MwxuzkumyTX7/a3n37gmsT3py7LIXwrShilPh3P1tR0= -cloud.google.com/go/resourcesettings v1.3.0/go.mod h1:lzew8VfESA5DQ8gdlHwMrqZs1S9V87v3oCnKCWoOuQU= -cloud.google.com/go/resourcesettings v1.4.0/go.mod h1:ldiH9IJpcrlC3VSuCGvjR5of/ezRrOxFtpJoJo5SmXg= -cloud.google.com/go/retail v1.8.0/go.mod h1:QblKS8waDmNUhghY2TI9O3JLlFk8jybHeV4BF19FrE4= -cloud.google.com/go/retail v1.9.0/go.mod h1:g6jb6mKuCS1QKnH/dpu7isX253absFl6iE92nHwlBUY= -cloud.google.com/go/retail v1.10.0/go.mod h1:2gDk9HsL4HMS4oZwz6daui2/jmKvqShXKQuB2RZ+cCc= -cloud.google.com/go/retail v1.11.0/go.mod h1:MBLk1NaWPmh6iVFSz9MeKG/Psyd7TAgm6y/9L2B4x9Y= -cloud.google.com/go/run v0.2.0/go.mod h1:CNtKsTA1sDcnqqIFR3Pb5Tq0usWxJJvsWOCPldRU3Do= -cloud.google.com/go/run v0.3.0/go.mod h1:TuyY1+taHxTjrD0ZFk2iAR+xyOXEA0ztb7U3UNA0zBo= -cloud.google.com/go/scheduler v1.4.0/go.mod h1:drcJBmxF3aqZJRhmkHQ9b3uSSpQoltBPGPxGAWROx6s= -cloud.google.com/go/scheduler v1.5.0/go.mod h1:ri073ym49NW3AfT6DZi21vLZrG07GXr5p3H1KxN5QlI= -cloud.google.com/go/scheduler v1.6.0/go.mod h1:SgeKVM7MIwPn3BqtcBntpLyrIJftQISRrYB5ZtT+KOk= -cloud.google.com/go/scheduler v1.7.0/go.mod h1:jyCiBqWW956uBjjPMMuX09n3x37mtyPJegEWKxRsn44= -cloud.google.com/go/secretmanager v1.6.0/go.mod h1:awVa/OXF6IiyaU1wQ34inzQNc4ISIDIrId8qE5QGgKA= -cloud.google.com/go/secretmanager v1.8.0/go.mod h1:hnVgi/bN5MYHd3Gt0SPuTPPp5ENina1/LxM+2W9U9J4= -cloud.google.com/go/secretmanager v1.9.0/go.mod h1:b71qH2l1yHmWQHt9LC80akm86mX8AL6X1MA01dW8ht4= -cloud.google.com/go/security v1.5.0/go.mod h1:lgxGdyOKKjHL4YG3/YwIL2zLqMFCKs0UbQwgyZmfJl4= -cloud.google.com/go/security v1.7.0/go.mod h1:mZklORHl6Bg7CNnnjLH//0UlAlaXqiG7Lb9PsPXLfD0= -cloud.google.com/go/security v1.8.0/go.mod h1:hAQOwgmaHhztFhiQ41CjDODdWP0+AE1B3sX4OFlq+GU= -cloud.google.com/go/security v1.9.0/go.mod h1:6Ta1bO8LXI89nZnmnsZGp9lVoVWXqsVbIq/t9dzI+2Q= -cloud.google.com/go/security v1.10.0/go.mod h1:QtOMZByJVlibUT2h9afNDWRZ1G96gVywH8T5GUSb9IA= -cloud.google.com/go/securitycenter v1.13.0/go.mod h1:cv5qNAqjY84FCN6Y9z28WlkKXyWsgLO832YiWwkCWcU= -cloud.google.com/go/securitycenter v1.14.0/go.mod h1:gZLAhtyKv85n52XYWt6RmeBdydyxfPeTrpToDPw4Auc= -cloud.google.com/go/securitycenter v1.15.0/go.mod h1:PeKJ0t8MoFmmXLXWm41JidyzI3PJjd8sXWaVqg43WWk= -cloud.google.com/go/securitycenter v1.16.0/go.mod h1:Q9GMaLQFUD+5ZTabrbujNWLtSLZIZF7SAR0wWECrjdk= -cloud.google.com/go/servicecontrol v1.4.0/go.mod h1:o0hUSJ1TXJAmi/7fLJAedOovnujSEvjKCAFNXPQ1RaU= -cloud.google.com/go/servicecontrol v1.5.0/go.mod h1:qM0CnXHhyqKVuiZnGKrIurvVImCs8gmqWsDoqe9sU1s= -cloud.google.com/go/servicedirectory v1.4.0/go.mod h1:gH1MUaZCgtP7qQiI+F+A+OpeKF/HQWgtAddhTbhL2bs= -cloud.google.com/go/servicedirectory v1.5.0/go.mod h1:QMKFL0NUySbpZJ1UZs3oFAmdvVxhhxB6eJ/Vlp73dfg= -cloud.google.com/go/servicedirectory v1.6.0/go.mod h1:pUlbnWsLH9c13yGkxCmfumWEPjsRs1RlmJ4pqiNjVL4= -cloud.google.com/go/servicedirectory v1.7.0/go.mod h1:5p/U5oyvgYGYejufvxhgwjL8UVXjkuw7q5XcG10wx1U= -cloud.google.com/go/servicemanagement v1.4.0/go.mod h1:d8t8MDbezI7Z2R1O/wu8oTggo3BI2GKYbdG4y/SJTco= -cloud.google.com/go/servicemanagement v1.5.0/go.mod h1:XGaCRe57kfqu4+lRxaFEAuqmjzF0r+gWHjWqKqBvKFo= -cloud.google.com/go/serviceusage v1.3.0/go.mod h1:Hya1cozXM4SeSKTAgGXgj97GlqUvF5JaoXacR1JTP/E= -cloud.google.com/go/serviceusage v1.4.0/go.mod h1:SB4yxXSaYVuUBYUml6qklyONXNLt83U0Rb+CXyhjEeU= -cloud.google.com/go/shell v1.3.0/go.mod h1:VZ9HmRjZBsjLGXusm7K5Q5lzzByZmJHf1d0IWHEN5X4= -cloud.google.com/go/shell v1.4.0/go.mod h1:HDxPzZf3GkDdhExzD/gs8Grqk+dmYcEjGShZgYa9URw= -cloud.google.com/go/speech v1.6.0/go.mod h1:79tcr4FHCimOp56lwC01xnt/WPJZc4v3gzyT7FoBkCM= -cloud.google.com/go/speech v1.7.0/go.mod h1:KptqL+BAQIhMsj1kOP2la5DSEEerPDuOP/2mmkhHhZQ= -cloud.google.com/go/speech v1.8.0/go.mod h1:9bYIl1/tjsAnMgKGHKmBZzXKEkGgtU+MpdDPTE9f7y0= -cloud.google.com/go/speech v1.9.0/go.mod h1:xQ0jTcmnRFFM2RfX/U+rk6FQNUF6DQlydUSyoooSpco= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y= -cloud.google.com/go/storage v1.23.0/go.mod h1:vOEEDNFnciUMhBeT6hsJIn3ieU5cFRmzeLgDvXzfIXc= -cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s= -cloud.google.com/go/storagetransfer v1.5.0/go.mod h1:dxNzUopWy7RQevYFHewchb29POFv3/AaBgnhqzqiK0w= -cloud.google.com/go/storagetransfer v1.6.0/go.mod h1:y77xm4CQV/ZhFZH75PLEXY0ROiS7Gh6pSKrM8dJyg6I= -cloud.google.com/go/talent v1.1.0/go.mod h1:Vl4pt9jiHKvOgF9KoZo6Kob9oV4lwd/ZD5Cto54zDRw= -cloud.google.com/go/talent v1.2.0/go.mod h1:MoNF9bhFQbiJ6eFD3uSsg0uBALw4n4gaCaEjBw9zo8g= -cloud.google.com/go/talent v1.3.0/go.mod h1:CmcxwJ/PKfRgd1pBjQgU6W3YBwiewmUzQYH5HHmSCmM= -cloud.google.com/go/talent v1.4.0/go.mod h1:ezFtAgVuRf8jRsvyE6EwmbTK5LKciD4KVnHuDEFmOOA= -cloud.google.com/go/texttospeech v1.4.0/go.mod h1:FX8HQHA6sEpJ7rCMSfXuzBcysDAuWusNNNvN9FELDd8= -cloud.google.com/go/texttospeech v1.5.0/go.mod h1:oKPLhR4n4ZdQqWKURdwxMy0uiTS1xU161C8W57Wkea4= -cloud.google.com/go/tpu v1.3.0/go.mod h1:aJIManG0o20tfDQlRIej44FcwGGl/cD0oiRyMKG19IQ= -cloud.google.com/go/tpu v1.4.0/go.mod h1:mjZaX8p0VBgllCzF6wcU2ovUXN9TONFLd7iz227X2Xg= -cloud.google.com/go/trace v1.3.0/go.mod h1:FFUE83d9Ca57C+K8rDl/Ih8LwOzWIV1krKgxg6N0G28= -cloud.google.com/go/trace v1.4.0/go.mod h1:UG0v8UBqzusp+z63o7FK74SdFE+AXpCLdFb1rshXG+Y= -cloud.google.com/go/translate v1.3.0/go.mod h1:gzMUwRjvOqj5i69y/LYLd8RrNQk+hOmIXTi9+nb3Djs= -cloud.google.com/go/translate v1.4.0/go.mod h1:06Dn/ppvLD6WvA5Rhdp029IX2Mi3Mn7fpMRLPvXT5Wg= -cloud.google.com/go/video v1.8.0/go.mod h1:sTzKFc0bUSByE8Yoh8X0mn8bMymItVGPfTuUBUyRgxk= -cloud.google.com/go/video v1.9.0/go.mod h1:0RhNKFRF5v92f8dQt0yhaHrEuH95m068JYOvLZYnJSw= -cloud.google.com/go/videointelligence v1.6.0/go.mod h1:w0DIDlVRKtwPCn/C4iwZIJdvC69yInhW0cfi+p546uU= -cloud.google.com/go/videointelligence v1.7.0/go.mod h1:k8pI/1wAhjznARtVT9U1llUaFNPh7muw8QyOUpavru4= -cloud.google.com/go/videointelligence v1.8.0/go.mod h1:dIcCn4gVDdS7yte/w+koiXn5dWVplOZkE+xwG9FgK+M= -cloud.google.com/go/videointelligence v1.9.0/go.mod h1:29lVRMPDYHikk3v8EdPSaL8Ku+eMzDljjuvRs105XoU= -cloud.google.com/go/vision v1.2.0/go.mod h1:SmNwgObm5DpFBme2xpyOyasvBc1aPdjvMk2bBk0tKD0= -cloud.google.com/go/vision/v2 v2.2.0/go.mod h1:uCdV4PpN1S0jyCyq8sIM42v2Y6zOLkZs+4R9LrGYwFo= -cloud.google.com/go/vision/v2 v2.3.0/go.mod h1:UO61abBx9QRMFkNBbf1D8B1LXdS2cGiiCRx0vSpZoUo= -cloud.google.com/go/vision/v2 v2.4.0/go.mod h1:VtI579ll9RpVTrdKdkMzckdnwMyX2JILb+MhPqRbPsY= -cloud.google.com/go/vision/v2 v2.5.0/go.mod h1:MmaezXOOE+IWa+cS7OhRRLK2cNv1ZL98zhqFFZaaH2E= -cloud.google.com/go/vmmigration v1.2.0/go.mod h1:IRf0o7myyWFSmVR1ItrBSFLFD/rJkfDCUTO4vLlJvsE= -cloud.google.com/go/vmmigration v1.3.0/go.mod h1:oGJ6ZgGPQOFdjHuocGcLqX4lc98YQ7Ygq8YQwHh9A7g= -cloud.google.com/go/vpcaccess v1.4.0/go.mod h1:aQHVbTWDYUR1EbTApSVvMq1EnT57ppDmQzZ3imqIk4w= -cloud.google.com/go/vpcaccess v1.5.0/go.mod h1:drmg4HLk9NkZpGfCmZ3Tz0Bwnm2+DKqViEpeEpOq0m8= -cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xXZmFiHmGE= -cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg= -cloud.google.com/go/webrisk v1.6.0/go.mod h1:65sW9V9rOosnc9ZY7A7jsy1zoHS5W9IAXv6dGqhMQMc= -cloud.google.com/go/webrisk v1.7.0/go.mod h1:mVMHgEYH0r337nmt1JyLthzMr6YxwN1aAIEc2fTcq7A= -cloud.google.com/go/websecurityscanner v1.3.0/go.mod h1:uImdKm2wyeXQevQJXeh8Uun/Ym1VqworNDlBXQevGMo= -cloud.google.com/go/websecurityscanner v1.4.0/go.mod h1:ebit/Fp0a+FWu5j4JOmJEV8S8CzdTkAS77oDsiSqYWQ= -cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= -cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= -cloud.google.com/go/workflows v1.8.0/go.mod h1:ysGhmEajwZxGn1OhGOGKsTXc5PyxOc0vfKf5Af+to4M= -cloud.google.com/go/workflows v1.9.0/go.mod h1:ZGkj1aFIOd9c8Gerkjjq7OW7I5+l6cSvT3ujaO/WwSA= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/OpenIMSDK/Open-IM-Server v1.0.8-0.20230619022250-c5dd8ad548ee h1:5UI7wtX5xie8/zqskm1KHnG4IaFVFxfvgjdVhbSeWts= -github.com/OpenIMSDK/Open-IM-Server v1.0.8-0.20230619022250-c5dd8ad548ee/go.mod h1:PpKNeLC9Co3O/6LgE4VS4iHU0fMhq9yaxNla3X9s2Ns= -github.com/OpenIMSDK/Open-IM-Server v1.0.8-0.20230620023235-df888d22e746 h1:lSB1FX1YwibRfV29l/jDQ4VO/s9mAJWOzXG2pkwVHzc= -github.com/OpenIMSDK/Open-IM-Server v1.0.8-0.20230620023235-df888d22e746/go.mod h1:GBrMkMbTcw7fq9HddKKHLtbui9J7bVx6eCCur41z+5U= -github.com/OpenIMSDK/Open-IM-Server v1.0.8-0.20230620064910-fbbd651f056a h1:IWLo5wLrqugVtPhBN1TvOg/9KqCPwvwfsxb6EHPdzyw= -github.com/OpenIMSDK/Open-IM-Server v1.0.8-0.20230620064910-fbbd651f056a/go.mod h1:GBrMkMbTcw7fq9HddKKHLtbui9J7bVx6eCCur41z+5U= -github.com/OpenIMSDK/Open-IM-Server v1.0.8-0.20230620090320-a1fc6e4e659e h1:MuBtS1VZO8MRpavyEGVzl8omkvPhvHeos423ESHHMW4= -github.com/OpenIMSDK/Open-IM-Server v1.0.8-0.20230620090320-a1fc6e4e659e/go.mod h1:GBrMkMbTcw7fq9HddKKHLtbui9J7bVx6eCCur41z+5U= -github.com/OpenIMSDK/Open-IM-Server v1.0.8-0.20230621033912-41023a440474 h1:Zn+c9mwlMY6ca84eW0jKyvnUTbmCv3lehoyBqVjsGPs= -github.com/OpenIMSDK/Open-IM-Server v1.0.8-0.20230621033912-41023a440474/go.mod h1:GBrMkMbTcw7fq9HddKKHLtbui9J7bVx6eCCur41z+5U= -github.com/OpenIMSDK/openKeeper v0.0.11 h1:woElBVvXZ90seBKRwHxkY4is7tpIiQNMkSgl27DMwzI= -github.com/OpenIMSDK/openKeeper v0.0.11/go.mod h1:HwHgo+p3E+aAeiLOSyDwVB2zFJtu+QvnFNlfNjFG9vA= +github.com/OpenIMSDK/Open-IM-Server v0.0.0-20230702094900-7930a8bf851b h1:1LTQ1l+ACFf6j9655SDz/ls/olJz6yYdVlbJL0uWsus= +github.com/OpenIMSDK/Open-IM-Server v0.0.0-20230702094900-7930a8bf851b/go.mod h1:sgp4idb/zDClK8RSct3EpRzYKIwKWi1d7mu6+En1RHI= +github.com/OpenIMSDK/Open-IM-Server v0.0.0-20230705123117-b494c73328c7 h1:SrydfYQulXD+2mJkkExIzu2u1r0eumE/mgWE4K1hfxE= +github.com/OpenIMSDK/Open-IM-Server v0.0.0-20230705123117-b494c73328c7/go.mod h1:TKF0pcxM9+CLGS9y7YAyqtiJ1qlWziuloJyCMlVeRGg= +github.com/OpenIMSDK/Open-IM-Server v1.0.8-0.20230630091751-3c10e2bb65ce h1:yqYqsUXIucBZ94GyUAUvAVZVJa2AfgPDwVtxp9vt1Nc= +github.com/OpenIMSDK/Open-IM-Server v1.0.8-0.20230630091751-3c10e2bb65ce/go.mod h1:sgp4idb/zDClK8RSct3EpRzYKIwKWi1d7mu6+En1RHI= github.com/OpenIMSDK/open_utils v1.0.8 h1:IopxWgJwEF5ZAPsRuiZZOfcxNOQOCt/p8VDENcHN9r4= github.com/OpenIMSDK/open_utils v1.0.8/go.mod h1:FLoaQblWUVKQgqt2LrNzfSZLT6D3DICBn1kcOMDLUOI= github.com/Shopify/sarama v1.29.0 h1:ARid8o8oieau9XrHI55f/L3EoRAhm9px6sonbD7yuUE= @@ -416,7 +80,6 @@ github.com/alibabacloud-go/tea-xml v1.1.2 h1:oLxa7JUXm2EDFzMg+7oRsYc+kutgCVwm+bZ github.com/alibabacloud-go/tea-xml v1.1.2/go.mod h1:Rq08vgCcCAjHyRi/M7xlHKUykZCEtyBy9+DPF6GgEu8= github.com/aliyun/credentials-go v1.1.2 h1:qU1vwGIBb3UJ8BwunHDRFtAhS6jnQLnde/yk0+Ih2GY= github.com/aliyun/credentials-go v1.1.2/go.mod h1:ozcZaMR5kLM7pwtCMEpVmQ242suV6qTJya2bDq4X1Tw= -github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= @@ -430,7 +93,6 @@ github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1 github.com/bytedance/sonic v1.9.1 h1:6iJ6NqdoxCDr6mbY8h18oSO+cShGSMRGCEo7F2h0x8s= github.com/bytedance/sonic v1.9.1/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= @@ -446,14 +108,6 @@ github.com/clbanning/mxj/v2 v2.5.6 h1:Jm4VaCI/+Ug5Q57IzEoZbwx4iQFA6wkXv72juUSeK+ github.com/clbanning/mxj/v2 v2.5.6/go.mod h1:hNiWqW14h+kc+MdF9C6/YoRfjEJoR3ou6tn/Qo+ve2s= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= -github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= 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= @@ -473,12 +127,6 @@ github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFP github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= -github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= -github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= -github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= @@ -486,7 +134,6 @@ github.com/frankban/quicktest v1.11.3 h1:8sXhOn0uLys67V8EsXLc6eszDs8VXWxL3iRvebP github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU= github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= 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= @@ -533,8 +180,6 @@ github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= -github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= -github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -550,7 +195,6 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= @@ -567,19 +211,12 @@ github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= -github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= @@ -587,43 +224,22 @@ github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= -github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= -github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= -github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= -github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM= -github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM= -github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= -github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo= -github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY= -github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gopherjs/gopherjs v0.0.0-20200217142428-fce0ec30dd00/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/hashicorp/go-uuid v1.0.2 h1:cfejS+Tpcp13yd5nYHWDI6qVCny6wyX2Mt5SGur2IGE= github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/jcmturner/aescts/v2 v2.0.0 h1:9YKLH6ey7H4eDBXW8khjYslgyqG2xZikXP0EQFKrle8= github.com/jcmturner/aescts/v2 v2.0.0/go.mod h1:AiaICIRyfYg35RUkr8yESTqvSy7csK90qZ5xfvvsoNs= github.com/jcmturner/dnsutils/v2 v2.0.0 h1:lltnkeZGL0wILNvrNiVCR6Ro5PGU/SeBvVO/8c/iPbo= @@ -750,7 +366,6 @@ github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5X github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/redis/go-redis/v9 v9.0.5 h1:CuQcn5HIEeK7BgElubPP8CGtE0KakrnbBSTLjathl5o= github.com/redis/go-redis/v9 v9.0.5/go.mod h1:WqMKv5vnQbRuZstUwxQI195wHy+t4PuXDOjzMvcuQHk= -github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rs/xid v1.2.1 h1:mhH9Nq+C1fY2l1XIpgxIiUOfNpRBYH1kKcr+qfKgjRc= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= @@ -762,7 +377,6 @@ github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVs github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/assertions v1.1.0/go.mod h1:tcbTF8ujkAEcZ8TElKY+i30BzYlVhC/LOxJk7iOWnoo= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= @@ -805,7 +419,6 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.30/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= go.mongodb.org/mongo-driver v1.8.3 h1:TDKlTkGDKm9kkJVUOAXDK5/fkqKHJVwYQSpoRfB43R4= go.mongodb.org/mongo-driver v1.8.3/go.mod h1:0sQWfOeY63QTntERDJJ/0SuKK0T1uVSgKCuAROlKEPY= @@ -814,9 +427,6 @@ go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= -go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= @@ -840,8 +450,8 @@ golang.org/x/crypto v0.0.0-20201112155050-0c6587e931a9/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20201216223049-8b5274cf687f/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g= -golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= +golang.org/x/crypto v0.10.0 h1:LKqV2xt9+kDzSTfOhx4FrkEBcMrAgHSYgzywV9zcGmM= +golang.org/x/crypto v0.10.0/go.mod h1:o4eNf7Ede1fv+hwOwZsTHl9EsPFO6q6ZvYR8vYfY45I= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -866,8 +476,6 @@ golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= @@ -876,9 +484,6 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -909,56 +514,21 @@ golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210427231257-85d9c07bbe3a/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= -golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= -golang.org/x/net v0.0.0-20221012135044-0b7e1fb9d458/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= -golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= -golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= -golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= -golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.11.0 h1:Gi2tvZIJyBtO9SDr1q9h5hEQCp/4L2RQ+ar0qjx2oNU= +golang.org/x/net v0.11.0/go.mod h1:2L/ixqYpgIVXmeoSA/4Lu7BzTG4KIyPIryS4IsOd1oQ= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= -golang.org/x/oauth2 v0.0.0-20220622183110-fd043fe589d2/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= -golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= -golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= -golang.org/x/oauth2 v0.0.0-20221006150949-b44042a4b9c1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= -golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -969,10 +539,7 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1008,71 +575,35 @@ golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= -golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.9.0 h1:KS/R3tvhPqvJvwcKfnBHJwwthS11LRhmM5D59eEXa0s= +golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= -golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= -golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.10.0 h1:UpjohKhiEgNc0CSauXmwYftY1+LlaC75SJwh0SgCX58= +golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1120,27 +651,12 @@ golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= @@ -1157,47 +673,12 @@ google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0M google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= -google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= -google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= -google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= -google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= -google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= -google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= -google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= -google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= -google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= -google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= -google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= -google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= -google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= -google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= -google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g= -google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA= -google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8= -google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= -google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= -google.golang.org/api v0.77.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= -google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= -google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= -google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= -google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= -google.golang.org/api v0.90.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= -google.golang.org/api v0.93.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= -google.golang.org/api v0.95.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI= -google.golang.org/api v0.96.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= -google.golang.org/api v0.97.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= -google.golang.org/api v0.98.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= -google.golang.org/api v0.99.0/go.mod h1:1YOf74vkVndF7pG6hIHuINsM7eWwpVTAfNMNiL91A08= -google.golang.org/api v0.100.0/go.mod h1:ZE3Z2+ZOr87Rx7dqFsdRQkRBk36kDtp/h+QpHbB7a70= -google.golang.org/api v0.102.0/go.mod h1:3VFl6/fzoA+qNuS1N1/VfXY4LjoXN/wzeIp7TweWwGo= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -1221,89 +702,14 @@ google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210329143202-679c6ae281ee/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= -google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= -google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= -google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= -google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= -google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= -google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= -google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= -google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= -google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= -google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220413183235-5e96e2839df9/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220628213854-d9e0b6570c03/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220722212130-b98a9ff5e252/go.mod h1:GkXuJDJ6aQ7lnJcRF+SJVgFdQhypqgl3LB1C9vabdRE= -google.golang.org/genproto v0.0.0-20220801145646-83ce21fca29f/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc= -google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= -google.golang.org/genproto v0.0.0-20220817144833-d7fd3f11b9b1/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= -google.golang.org/genproto v0.0.0-20220822174746-9e6da59bd2fc/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= -google.golang.org/genproto v0.0.0-20220829144015-23454907ede3/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= -google.golang.org/genproto v0.0.0-20220829175752-36a9c930ecbf/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= -google.golang.org/genproto v0.0.0-20220913154956-18f8339a66a5/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= -google.golang.org/genproto v0.0.0-20220914142337-ca0e39ece12f/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= -google.golang.org/genproto v0.0.0-20220915135415-7fd63a7952de/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= -google.golang.org/genproto v0.0.0-20220916172020-2692e8806bfa/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= -google.golang.org/genproto v0.0.0-20220919141832-68c03719ef51/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= -google.golang.org/genproto v0.0.0-20220920201722-2b89144ce006/go.mod h1:ht8XFiar2npT/g4vkk7O0WYS1sHOHbdujxbEp7CJWbw= -google.golang.org/genproto v0.0.0-20220926165614-551eb538f295/go.mod h1:woMGP53BroOrRY3xTxlbr8Y3eB/nzAvvFM83q7kG2OI= -google.golang.org/genproto v0.0.0-20220926220553-6981cbe3cfce/go.mod h1:woMGP53BroOrRY3xTxlbr8Y3eB/nzAvvFM83q7kG2OI= -google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e/go.mod h1:3526vdqwhZAwq4wsRUaVG555sVgsNmIjRtO7t/JH29U= -google.golang.org/genproto v0.0.0-20221014173430-6e2ab493f96b/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= -google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= -google.golang.org/genproto v0.0.0-20221024153911-1573dae28c9c/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= -google.golang.org/genproto v0.0.0-20221024183307-1bc688fe9f3e/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= -google.golang.org/genproto v0.0.0-20221027153422-115e99e71e1c/go.mod h1:CGI5F/G+E5bKwmfYo09AXuVN4dD894kIKUFmVbP2/Fo= -google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= -google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 h1:KpwkzHKEF7B9Zxg18WzOa7djJ+Ha5DzthMyZYQfEn2A= -google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230626202813-9b080da550b3 h1:QJuqz7YzNTyKDspkp2lrzqtq4lf2AhUSpXTsGP5SbLw= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230626202813-9b080da550b3/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -1316,33 +722,8 @@ google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKa google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= -google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= -google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= -google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.52.3/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5vorUY= google.golang.org/grpc v1.55.0 h1:3Oj82/tFSCeUrRTg/5E/7d/W5A1tj6Ky1ABAuZuv5ag= google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8= -google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -1355,11 +736,8 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= 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.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= -google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1373,7 +751,6 @@ gopkg.in/ini.v1 v1.66.2 h1:XfR1dOYubytKy4Shzc2LHrrGhU0lDCfDGG1yLPmpgsI= gopkg.in/ini.v1 v1.66.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/internal/api/admin.go b/internal/api/admin.go index 21c087c79..41d0fc60a 100644 --- a/internal/api/admin.go +++ b/internal/api/admin.go @@ -1,156 +1,161 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package api import ( - "context" "github.com/OpenIMSDK/Open-IM-Server/pkg/a2r" - "github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry" - "github.com/OpenIMSDK/chat/pkg/common/config" + "github.com/gin-gonic/gin" + "google.golang.org/grpc" + "github.com/OpenIMSDK/chat/pkg/proto/admin" "github.com/OpenIMSDK/chat/pkg/proto/chat" - "github.com/gin-gonic/gin" ) -func NewAdmin(discov discoveryregistry.SvcDiscoveryRegistry) *Admin { - chatConn, err := discov.GetConn(context.Background(), config.Config.RpcRegisterName.OpenImChatName) - if err != nil { - panic(err) - } - adminConn, err := discov.GetConn(context.Background(), config.Config.RpcRegisterName.OpenImAdminName) - if err != nil { - panic(err) - } - return &Admin{chatClient: chat.NewChatClient(chatConn), adminClient: admin.NewAdminClient(adminConn)} +func NewAdmin(chatConn, adminConn grpc.ClientConnInterface) *AdminApi { + return &AdminApi{chatClient: chat.NewChatClient(chatConn), adminClient: admin.NewAdminClient(adminConn)} } -type Admin struct { +type AdminApi struct { chatClient chat.ChatClient adminClient admin.AdminClient } -func (o *Admin) AdminLogin(c *gin.Context) { +func (o *AdminApi) AdminLogin(c *gin.Context) { a2r.Call(admin.AdminClient.Login, o.adminClient, c) } -func (o *Admin) ResetUserPassword(c *gin.Context) { +func (o *AdminApi) ResetUserPassword(c *gin.Context) { a2r.Call(chat.ChatClient.ChangePassword, o.chatClient, c) } -func (o *Admin) AdminUpdateInfo(c *gin.Context) { +func (o *AdminApi) AdminUpdateInfo(c *gin.Context) { a2r.Call(admin.AdminClient.AdminUpdateInfo, o.adminClient, c) } -func (o *Admin) AdminInfo(c *gin.Context) { +func (o *AdminApi) AdminInfo(c *gin.Context) { a2r.Call(admin.AdminClient.GetAdminInfo, o.adminClient, c) } -func (o *Admin) AddDefaultFriend(c *gin.Context) { +func (o *AdminApi) AddDefaultFriend(c *gin.Context) { a2r.Call(admin.AdminClient.AddDefaultFriend, o.adminClient, c) } -func (o *Admin) DelDefaultFriend(c *gin.Context) { +func (o *AdminApi) DelDefaultFriend(c *gin.Context) { a2r.Call(admin.AdminClient.DelDefaultFriend, o.adminClient, c) } -func (o *Admin) SearchDefaultFriend(c *gin.Context) { +func (o *AdminApi) SearchDefaultFriend(c *gin.Context) { a2r.Call(admin.AdminClient.SearchDefaultFriend, o.adminClient, c) } -func (o *Admin) FindDefaultFriend(c *gin.Context) { +func (o *AdminApi) FindDefaultFriend(c *gin.Context) { a2r.Call(admin.AdminClient.FindDefaultFriend, o.adminClient, c) } -func (o *Admin) AddDefaultGroup(c *gin.Context) { +func (o *AdminApi) AddDefaultGroup(c *gin.Context) { a2r.Call(admin.AdminClient.AddDefaultGroup, o.adminClient, c) } -func (o *Admin) DelDefaultGroup(c *gin.Context) { +func (o *AdminApi) DelDefaultGroup(c *gin.Context) { a2r.Call(admin.AdminClient.DelDefaultGroup, o.adminClient, c) } -func (o *Admin) FindDefaultGroup(c *gin.Context) { +func (o *AdminApi) FindDefaultGroup(c *gin.Context) { a2r.Call(admin.AdminClient.FindDefaultGroup, o.adminClient, c) } -func (o *Admin) SearchDefaultGroup(c *gin.Context) { +func (o *AdminApi) SearchDefaultGroup(c *gin.Context) { a2r.Call(admin.AdminClient.SearchDefaultGroup, o.adminClient, c) } -func (o *Admin) AddInvitationCode(c *gin.Context) { +func (o *AdminApi) AddInvitationCode(c *gin.Context) { a2r.Call(admin.AdminClient.AddInvitationCode, o.adminClient, c) } -func (o *Admin) GenInvitationCode(c *gin.Context) { +func (o *AdminApi) GenInvitationCode(c *gin.Context) { a2r.Call(admin.AdminClient.GenInvitationCode, o.adminClient, c) } -func (o *Admin) DelInvitationCode(c *gin.Context) { +func (o *AdminApi) DelInvitationCode(c *gin.Context) { a2r.Call(admin.AdminClient.DelInvitationCode, o.adminClient, c) } -func (o *Admin) SearchInvitationCode(c *gin.Context) { +func (o *AdminApi) SearchInvitationCode(c *gin.Context) { a2r.Call(admin.AdminClient.SearchInvitationCode, o.adminClient, c) } -func (o *Admin) AddUserIPLimitLogin(c *gin.Context) { +func (o *AdminApi) AddUserIPLimitLogin(c *gin.Context) { a2r.Call(admin.AdminClient.AddUserIPLimitLogin, o.adminClient, c) } -func (o *Admin) SearchUserIPLimitLogin(c *gin.Context) { +func (o *AdminApi) SearchUserIPLimitLogin(c *gin.Context) { a2r.Call(admin.AdminClient.SearchUserIPLimitLogin, o.adminClient, c) } -func (o *Admin) DelUserIPLimitLogin(c *gin.Context) { +func (o *AdminApi) DelUserIPLimitLogin(c *gin.Context) { a2r.Call(admin.AdminClient.DelUserIPLimitLogin, o.adminClient, c) } -func (o *Admin) SearchIPForbidden(c *gin.Context) { +func (o *AdminApi) SearchIPForbidden(c *gin.Context) { a2r.Call(admin.AdminClient.SearchIPForbidden, o.adminClient, c) } -func (o *Admin) AddIPForbidden(c *gin.Context) { +func (o *AdminApi) AddIPForbidden(c *gin.Context) { a2r.Call(admin.AdminClient.AddIPForbidden, o.adminClient, c) } -func (o *Admin) DelIPForbidden(c *gin.Context) { +func (o *AdminApi) DelIPForbidden(c *gin.Context) { a2r.Call(admin.AdminClient.DelIPForbidden, o.adminClient, c) } -func (o *Admin) ParseToken(c *gin.Context) { +func (o *AdminApi) ParseToken(c *gin.Context) { a2r.Call(admin.AdminClient.ParseToken, o.adminClient, c) } -func (o *Admin) BlockUser(c *gin.Context) { +func (o *AdminApi) BlockUser(c *gin.Context) { a2r.Call(admin.AdminClient.BlockUser, o.adminClient, c) } -func (o *Admin) UnblockUser(c *gin.Context) { +func (o *AdminApi) UnblockUser(c *gin.Context) { a2r.Call(admin.AdminClient.UnblockUser, o.adminClient, c) } -func (o *Admin) SearchBlockUser(c *gin.Context) { +func (o *AdminApi) SearchBlockUser(c *gin.Context) { a2r.Call(admin.AdminClient.SearchBlockUser, o.adminClient, c) } -func (o *Admin) SetClientConfig(c *gin.Context) { +func (o *AdminApi) SetClientConfig(c *gin.Context) { a2r.Call(admin.AdminClient.SetClientConfig, o.adminClient, c) } -func (o *Admin) GetClientConfig(c *gin.Context) { +func (o *AdminApi) GetClientConfig(c *gin.Context) { a2r.Call(admin.AdminClient.GetClientConfig, o.adminClient, c) } -func (o *Admin) AddApplet(c *gin.Context) { +func (o *AdminApi) AddApplet(c *gin.Context) { a2r.Call(admin.AdminClient.AddApplet, o.adminClient, c) } -func (o *Admin) DelApplet(c *gin.Context) { +func (o *AdminApi) DelApplet(c *gin.Context) { a2r.Call(admin.AdminClient.DelApplet, o.adminClient, c) } -func (o *Admin) UpdateApplet(c *gin.Context) { +func (o *AdminApi) UpdateApplet(c *gin.Context) { a2r.Call(admin.AdminClient.UpdateApplet, o.adminClient, c) } -func (o *Admin) SearchApplet(c *gin.Context) { +func (o *AdminApi) SearchApplet(c *gin.Context) { a2r.Call(admin.AdminClient.SearchApplet, o.adminClient, c) } diff --git a/internal/api/chat.go b/internal/api/chat.go index e00476005..8dd496bc4 100644 --- a/internal/api/chat.go +++ b/internal/api/chat.go @@ -1,41 +1,49 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package api import ( - "context" "fmt" + "io" + "net" + "github.com/OpenIMSDK/Open-IM-Server/pkg/a2r" "github.com/OpenIMSDK/Open-IM-Server/pkg/apiresp" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" - "github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry" "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" + "github.com/gin-gonic/gin" + "google.golang.org/grpc" + "github.com/OpenIMSDK/chat/pkg/common/config" "github.com/OpenIMSDK/chat/pkg/proto/admin" "github.com/OpenIMSDK/chat/pkg/proto/chat" - "github.com/gin-gonic/gin" - "io" - "net" ) -func NewChat(discov discoveryregistry.SvcDiscoveryRegistry) *Chat { - chatConn, err := discov.GetConn(context.Background(), config.Config.RpcRegisterName.OpenImChatName) - if err != nil { - panic(err) - } - adminConn, err := discov.GetConn(context.Background(), config.Config.RpcRegisterName.OpenImAdminName) - if err != nil { - panic(err) - } - return &Chat{chatClient: chat.NewChatClient(chatConn), adminClient: admin.NewAdminClient(adminConn)} +func NewChat(chatConn, adminConn grpc.ClientConnInterface) *ChatApi { + + return &ChatApi{chatClient: chat.NewChatClient(chatConn), adminClient: admin.NewAdminClient(adminConn)} } -type Chat struct { +type ChatApi struct { chatClient chat.ChatClient adminClient admin.AdminClient } // ################## ACCOUNT ################## -func (o *Chat) SendVerifyCode(c *gin.Context) { +func (o *ChatApi) SendVerifyCode(c *gin.Context) { var req chat.SendVerifyCodeReq if err := c.BindJSON(&req); err != nil { apiresp.GinError(c, err) @@ -55,11 +63,11 @@ func (o *Chat) SendVerifyCode(c *gin.Context) { apiresp.GinSuccess(c, resp) } -func (o *Chat) VerifyCode(c *gin.Context) { +func (o *ChatApi) VerifyCode(c *gin.Context) { a2r.Call(chat.ChatClient.VerifyCode, o.chatClient, c) } -func (o *Chat) RegisterUser(c *gin.Context) { +func (o *ChatApi) RegisterUser(c *gin.Context) { var req chat.RegisterUserReq if err := c.BindJSON(&req); err != nil { apiresp.GinError(c, err) @@ -77,10 +85,10 @@ func (o *Chat) RegisterUser(c *gin.Context) { return } apiresp.GinSuccess(c, resp) - //a2r.Call(chat.ChatClient.RegisterUser, o.chatClient, c) + // a2r.Call(chat.ChatClient.RegisterUser, o.chatClient, c) } -func (o *Chat) Login(c *gin.Context) { +func (o *ChatApi) Login(c *gin.Context) { var req chat.LoginReq if err := c.BindJSON(&req); err != nil { apiresp.GinError(c, err) @@ -100,55 +108,55 @@ func (o *Chat) Login(c *gin.Context) { apiresp.GinSuccess(c, resp) } -func (o *Chat) ResetPassword(c *gin.Context) { +func (o *ChatApi) ResetPassword(c *gin.Context) { a2r.Call(chat.ChatClient.ResetPassword, o.chatClient, c) } -func (o *Chat) ChangePassword(c *gin.Context) { +func (o *ChatApi) ChangePassword(c *gin.Context) { a2r.Call(chat.ChatClient.ChangePassword, o.chatClient, c) } // ################## USER ################## -func (o *Chat) UpdateUserInfo(c *gin.Context) { +func (o *ChatApi) UpdateUserInfo(c *gin.Context) { a2r.Call(chat.ChatClient.UpdateUserInfo, o.chatClient, c) } -func (o *Chat) FindUserPublicInfo(c *gin.Context) { +func (o *ChatApi) FindUserPublicInfo(c *gin.Context) { a2r.Call(chat.ChatClient.FindUserPublicInfo, o.chatClient, c) } -func (o *Chat) FindUserFullInfo(c *gin.Context) { +func (o *ChatApi) FindUserFullInfo(c *gin.Context) { a2r.Call(chat.ChatClient.FindUserFullInfo, o.chatClient, c) } -//func (o *Chat) GetUsersFullInfo(c *gin.Context) { +//func (o *ChatApi) GetUsersFullInfo(c *gin.Context) { // a2r.Call(chat.ChatClient.GetUsersFullInfo, o.chatClient, c) //} -func (o *Chat) SearchUserFullInfo(c *gin.Context) { +func (o *ChatApi) SearchUserFullInfo(c *gin.Context) { a2r.Call(chat.ChatClient.SearchUserFullInfo, o.chatClient, c) } -func (o *Chat) SearchUserPublicInfo(c *gin.Context) { +func (o *ChatApi) SearchUserPublicInfo(c *gin.Context) { a2r.Call(chat.ChatClient.SearchUserPublicInfo, o.chatClient, c) } // ################## APPLET ################## -func (o *Chat) FindApplet(c *gin.Context) { +func (o *ChatApi) FindApplet(c *gin.Context) { a2r.Call(admin.AdminClient.FindApplet, o.adminClient, c) } // ################## CONFIG ################## -func (o *Chat) GetClientConfig(c *gin.Context) { +func (o *ChatApi) GetClientConfig(c *gin.Context) { a2r.Call(admin.AdminClient.GetClientConfig, o.adminClient, c) } // ################## CALLBACK ################## -func (o *Chat) OpenIMCallback(c *gin.Context) { +func (o *ChatApi) OpenIMCallback(c *gin.Context) { body, err := io.ReadAll(c.Request.Body) if err != nil { apiresp.GinError(c, err) @@ -165,7 +173,7 @@ func (o *Chat) OpenIMCallback(c *gin.Context) { apiresp.GinSuccess(c, nil) } -func (o *Chat) getClientIP(c *gin.Context) (string, error) { +func (o *ChatApi) getClientIP(c *gin.Context) (string, error) { if config.Config.ProxyHeader == "" { ip, _, err := net.SplitHostPort(c.Request.RemoteAddr) return ip, err diff --git a/internal/api/mw.go b/internal/api/mw.go index e4dc41d4e..5a80b1aac 100644 --- a/internal/api/mw.go +++ b/internal/api/mw.go @@ -1,31 +1,37 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package api import ( - "context" + "strconv" + "github.com/OpenIMSDK/Open-IM-Server/pkg/apiresp" - "github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry" "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" - "github.com/OpenIMSDK/chat/pkg/common/config" + "github.com/gin-gonic/gin" + "google.golang.org/grpc" + "github.com/OpenIMSDK/chat/pkg/common/constant" "github.com/OpenIMSDK/chat/pkg/proto/admin" - "github.com/gin-gonic/gin" - "strconv" ) -func NewMW(zk discoveryregistry.SvcDiscoveryRegistry) *MW { - return &MW{zk: zk} +func NewMW(adminConn grpc.ClientConnInterface) *MW { + return &MW{client: admin.NewAdminClient(adminConn)} } type MW struct { - zk discoveryregistry.SvcDiscoveryRegistry -} - -func (o *MW) adminClient(ctx context.Context) (admin.AdminClient, error) { - conn, err := o.zk.GetConn(ctx, config.Config.RpcRegisterName.OpenImAdminName) - if err != nil { - return nil, err - } - return admin.NewAdminClient(conn), nil + client admin.AdminClient } func (o *MW) parseToken(c *gin.Context) (string, int32, error) { @@ -33,11 +39,7 @@ func (o *MW) parseToken(c *gin.Context) (string, int32, error) { if token == "" { return "", 0, errs.ErrArgs.Wrap("token is empty") } - client, err := o.adminClient(c) - if err != nil { - return "", 0, err - } - resp, err := client.ParseToken(c, &admin.ParseTokenReq{Token: token}) + resp, err := o.client.ParseToken(c, &admin.ParseTokenReq{Token: token}) if err != nil { return "", 0, err } diff --git a/internal/api/organization.go b/internal/api/organization.go new file mode 100644 index 000000000..f447875c0 --- /dev/null +++ b/internal/api/organization.go @@ -0,0 +1,273 @@ +package api + +import ( + "crypto/md5" + "encoding/hex" + "github.com/OpenIMSDK/Open-IM-Server/pkg/a2r" + "github.com/OpenIMSDK/Open-IM-Server/pkg/apiresp" + "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" + "github.com/OpenIMSDK/chat/pkg/common/config" + "github.com/OpenIMSDK/chat/pkg/common/constant" + "github.com/OpenIMSDK/chat/pkg/common/xlsx" + "github.com/OpenIMSDK/chat/pkg/common/xlsx/model" + "github.com/OpenIMSDK/chat/pkg/proto/chat" + "github.com/OpenIMSDK/chat/pkg/proto/organization" + "github.com/gin-gonic/gin" + "google.golang.org/grpc" + "net/http" + "strconv" + "strings" + "time" +) + +func NewOrg(chatConn, orgConn grpc.ClientConnInterface) *Org { + return &Org{ + organizationClient: organization.NewOrganizationClient(orgConn), + chatClient: chat.NewChatClient(chatConn), + } +} + +type Org struct { + organizationClient organization.OrganizationClient + chatClient chat.ChatClient +} + +func (o *Org) CreateDepartment(c *gin.Context) { + a2r.Call(organization.OrganizationClient.CreateDepartment, o.organizationClient, c) +} + +func (o *Org) UpdateDepartment(c *gin.Context) { + a2r.Call(organization.OrganizationClient.UpdateDepartment, o.organizationClient, c) +} + +func (o *Org) DeleteDepartment(c *gin.Context) { + a2r.Call(organization.OrganizationClient.DeleteDepartment, o.organizationClient, c) +} + +func (o *Org) GetDepartment(c *gin.Context) { + a2r.Call(organization.OrganizationClient.GetDepartment, o.organizationClient, c) +} + +func (o *Org) CreateOrganizationUser(c *gin.Context) { + a2r.Call(organization.OrganizationClient.CreateOrganizationUser, o.organizationClient, c) +} + +func (o *Org) UpdateOrganizationUser(c *gin.Context) { + a2r.Call(organization.OrganizationClient.UpdateOrganizationUser, o.organizationClient, c) +} +func (o *Org) CreateDepartmentMember(c *gin.Context) { + a2r.Call(organization.OrganizationClient.CreateDepartmentMember, o.organizationClient, c) +} +func (o *Org) GetUserInDepartment(c *gin.Context) { + a2r.Call(organization.OrganizationClient.GetUserInDepartment, o.organizationClient, c) +} + +func (o *Org) UpdateUserInDepartment(c *gin.Context) { + a2r.Call(organization.OrganizationClient.UpdateUserInDepartment, o.organizationClient, c) +} + +func (o *Org) DeleteUserInDepartment(c *gin.Context) { + a2r.Call(organization.OrganizationClient.DeleteUserInDepartment, o.organizationClient, c) +} + +func (o *Org) GetSearchUserList(c *gin.Context) { + a2r.Call(organization.OrganizationClient.GetSearchUserList, o.organizationClient, c) +} + +func (o *Org) SetOrganization(c *gin.Context) { + a2r.Call(organization.OrganizationClient.SetOrganization, o.organizationClient, c) +} + +func (o *Org) GetOrganization(c *gin.Context) { + a2r.Call(organization.OrganizationClient.GetOrganization, o.organizationClient, c) +} + +func (o *Org) MoveUserDepartment(c *gin.Context) { + a2r.Call(organization.OrganizationClient.MoveUserDepartment, o.organizationClient, c) +} + +func (o *Org) GetSubDepartment(c *gin.Context) { + a2r.Call(organization.OrganizationClient.GetSubDepartment, o.organizationClient, c) +} + +func (o *Org) GetSearchDepartmentUser(c *gin.Context) { + a2r.Call(organization.OrganizationClient.GetSearchDepartmentUser, o.organizationClient, c) +} + +func (o *Org) GetOrganizationDepartment(c *gin.Context) { + a2r.Call(organization.OrganizationClient.GetOrganizationDepartment, o.organizationClient, c) +} + +func (o *Org) SortDepartmentList(c *gin.Context) { + a2r.Call(organization.OrganizationClient.SortDepartmentList, o.organizationClient, c) +} + +func (o *Org) SortOrganizationUserList(c *gin.Context) { + a2r.Call(organization.OrganizationClient.SortOrganizationUserList, o.organizationClient, c) +} + +func (o *Org) CreateNewOrganizationMember(c *gin.Context) { + a2r.Call(organization.OrganizationClient.CreateNewOrganizationMember, o.organizationClient, c) +} + +func (o *Org) DeleteOrganizationUser(c *gin.Context) { + a2r.Call(organization.OrganizationClient.DeleteOrganizationUser, o.organizationClient, c) +} + +func (o *Org) BatchImportTemplate(c *gin.Context) { + md5Sum := md5.Sum(config.ImportTemplate) + md5Val := hex.EncodeToString(md5Sum[:]) + if c.GetHeader("If-None-Match") == md5Val { + c.Status(http.StatusNotModified) + return + } + c.Header("Content-Disposition", "attachment; filename=template.xlsx") + c.Header("Content-Transfer-Encoding", "binary") + c.Header("Content-Description", "File Transfer") + c.Header("Content-Length", strconv.Itoa(len(config.ImportTemplate))) + c.Header("ETag", md5Val) + c.Data(http.StatusOK, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", config.ImportTemplate) +} + +func (o *Org) BatchImport(c *gin.Context) { + resp, err := o.batchImport(c) + if err != nil { + apiresp.GinError(c, err) + return + } + apiresp.GinSuccess(c, resp) +} + +func (o *Org) batchImport(c *gin.Context) (*organization.BatchImportResp, error) { + formFile, err := c.FormFile("data") + if err != nil { + return nil, err + } + file, err := formFile.Open() + if err != nil { + return nil, err + } + defer file.Close() + var ( + departments []model.Department + users []model.OrganizationUser + ) + if err := xlsx.ParseAll(file, &departments, &users); err != nil { + return nil, err + } + rpcReq := organization.BatchImportReq{} + for _, department := range departments { + var names []string + for _, name := range strings.Split(department.Parent, "/") { + name = strings.TrimSpace(name) + if name != "" { + names = append(names, name) + } + } + rpcReq.DepartmentList = append(rpcReq.DepartmentList, &organization.BatchImportDepartment{ + DepartmentID: department.DepartmentID, + FaceURL: department.FaceURL, + Name: department.Name, + DepartmentType: department.DepartmentType, + RelatedGroupID: department.RelatedGroupID, + ParentDepartmentName: &organization.BatchImportUserDepartmentName{ + HierarchyName: names, + }, + }) + } + for _, user := range users { + var birth int64 + if user.Birth == "" { + birth = constant.NilTimestamp + } else { + var arr []string + for _, s := range []string{"-", "/"} { + if index := strings.Index(user.Birth, s); index >= 0 { + arr = strings.Split(user.Birth, s) + break + } + } + if len(arr) != 3 { + return nil, errs.ErrArgs.Wrap(user.Birth + " birth parse error") + } + for i, s := range arr[1:] { + if len(s) == 1 { + arr[i] = "0" + s + } + } + t, err := time.Parse("2006-01-02", strings.Join(arr, "-")) + if err != nil { + return nil, errs.ErrArgs.Wrap(user.Birth + " birth parse error " + err.Error()) + } + birth = t.UnixMilli() + } + var gender int32 + switch strings.ToLower(user.Gender) { + case "male", "男", "1": + gender = constant.GenderMale + case "female", "女", "0": + gender = constant.GenderFemale + default: + gender = constant.GenderUnknown + } + if user.Account == "" { + return nil, errs.ErrArgs.Wrap("account is empty") + } + if user.Password == "" { + return nil, errs.ErrArgs.Wrap("password is empty") + } + var list []*organization.BatchImportUserDepartmentNamePosition + user.Department = strings.TrimSpace(user.Department) + if user.Department != "" { + for _, dstr := range strings.Split(user.Department, ";") { // 分为多个部门 + dstr = strings.TrimSpace(dstr) + temp := strings.Split(dstr, "/") // 部门路径 + var item organization.BatchImportUserDepartmentNamePosition + for i, name := range temp { + name = strings.TrimSpace(name) + if len(temp) == i+1 { // 最后一个 + arr := strings.Split(name, ":") + switch len(arr) { + case 1: + ts := strings.TrimSpace(arr[0]) + if ts != "" { + item.HierarchyName = append(item.HierarchyName, ts) + } + case 2: + ts := strings.TrimSpace(arr[0]) + if ts != "" { + item.HierarchyName = append(item.HierarchyName, ts) + } + item.Position = strings.TrimSpace(arr[1]) + default: + return nil, errs.ErrArgs.Wrap("password is empty") + } + } else { + if name != "" { // 非最后一个 + item.HierarchyName = append(item.HierarchyName, name) + } + } + } + list = append(list, &item) + } + } + pwdSum := md5.Sum([]byte(user.Password)) + rpcReq.UserList = append(rpcReq.UserList, &organization.BatchImportUser{ + UserID: user.UserID, + Nickname: user.Nickname, + EnglishName: user.EnglishName, + FaceURL: user.FaceURL, + Gender: gender, + Mobile: user.Mobile, + Telephone: user.Telephone, + Birth: birth, + Email: user.Email, + Account: user.Account, + Password: hex.EncodeToString(pwdSum[:]), + AreaCode: user.AreaCode, + Station: user.Station, + UserDepartmentNameList: list, + }) + } + return o.organizationClient.BatchImport(c, &rpcReq) +} diff --git a/internal/api/router.go b/internal/api/router.go index da3808b74..b029da7d5 100644 --- a/internal/api/router.go +++ b/internal/api/router.go @@ -1,87 +1,178 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package api import ( + "context" + "github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry" + "github.com/OpenIMSDK/chat/pkg/common/config" "github.com/gin-gonic/gin" ) -func NewChatRoute(router gin.IRouter, zk discoveryregistry.SvcDiscoveryRegistry) { - mw := NewMW(zk) - chat := NewChat(zk) +func NewChatRoute(router gin.IRouter, discov discoveryregistry.SvcDiscoveryRegistry) { + chatConn, err := discov.GetConn(context.Background(), config.Config.RpcRegisterName.OpenImChatName) + if err != nil { + panic(err) + } + adminConn, err := discov.GetConn(context.Background(), config.Config.RpcRegisterName.OpenImAdminName) + if err != nil { + panic(err) + } + orgConn, err := discov.GetConn(context.Background(), config.Config.RpcRegisterName.OpenImOrganizationName) + if err != nil { + panic(err) + } + mw := NewMW(adminConn) + chat := NewChat(chatConn, adminConn) + org := NewOrg(chatConn, orgConn) + account := router.Group("/account") - account.POST("/code/send", chat.SendVerifyCode) //发送验证码 - account.POST("/code/verify", chat.VerifyCode) //校验验证码 - account.POST("/register", chat.RegisterUser) //注册 - account.POST("/login", chat.Login) //登录 - account.POST("/password/reset", chat.ResetPassword) //忘记密码 - account.POST("/password/change", mw.CheckToken, chat.ChangePassword) //修改密码 + account.POST("/code/send", chat.SendVerifyCode) // 发送验证码 + account.POST("/code/verify", chat.VerifyCode) // 校验验证码 + account.POST("/register", chat.RegisterUser) // 注册 + account.POST("/login", chat.Login) // 登录 + account.POST("/password/reset", chat.ResetPassword) // 忘记密码 + account.POST("/password/change", mw.CheckToken, chat.ChangePassword) // 修改密码 user := router.Group("/user", mw.CheckToken) - user.POST("/update", chat.UpdateUserInfo) //编辑个人资料 - user.POST("/find/public", chat.FindUserPublicInfo) //获取用户公开信息 - user.POST("/find/full", chat.FindUserFullInfo) //获取用户所有信息 - user.POST("/search/full", chat.SearchUserFullInfo) //搜索用户公开信息 - user.POST("/search/public", chat.SearchUserPublicInfo) //搜索用户所有信息 + user.POST("/update", chat.UpdateUserInfo) // 编辑个人资料 + user.POST("/find/public", chat.FindUserPublicInfo) // 获取用户公开信息 + user.POST("/find/full", chat.FindUserFullInfo) // 获取用户所有信息 + user.POST("/search/full", chat.SearchUserFullInfo) // 搜索用户公开信息 + user.POST("/search/public", chat.SearchUserPublicInfo) // 搜索用户所有信息 + + router.Group("/applet").POST("/find", mw.CheckToken, chat.FindApplet) // 小程序列表 - router.Group("/applet").POST("/find", mw.CheckToken, chat.FindApplet) //小程序列表 + router.Group("/client_config").POST("/get", chat.GetClientConfig) // 获取客户端初始化配置 - router.Group("/client_config").POST("/get", chat.GetClientConfig) //获取客户端初始化配置 + router.Group("/callback").POST("/open_im", chat.OpenIMCallback) // 回调 - router.Group("/callback").POST("/open_im", chat.OpenIMCallback) //回调 + organizationGroup := router.Group("/organization", mw.CheckToken) + organizationGroup.POST("/get_department", org.GetDepartment) // 查询部门 + organizationGroup.POST("/get_sub_department", org.GetSubDepartment) // 获取部门的人和同级部门 + organizationGroup.POST("/get_user_in_department", org.GetUserInDepartment) // 获取用户所在部门 + organizationGroup.POST("/get_search_department_user", org.GetSearchDepartmentUser) // 搜索部门和用户 + organizationGroup.POST("/get_organization_department", org.GetOrganizationDepartment) // 获取组织部门 } -func NewAdminRoute(router gin.IRouter, zk discoveryregistry.SvcDiscoveryRegistry) { - mw := NewMW(zk) - admin := NewAdmin(zk) +func NewAdminRoute(router gin.IRouter, discov discoveryregistry.SvcDiscoveryRegistry) { + adminConn, err := discov.GetConn(context.Background(), config.Config.RpcRegisterName.OpenImAdminName) + if err != nil { + panic(err) + } + chatConn, err := discov.GetConn(context.Background(), config.Config.RpcRegisterName.OpenImChatName) + if err != nil { + panic(err) + } + orgConn, err := discov.GetConn(context.Background(), config.Config.RpcRegisterName.OpenImOrganizationName) + if err != nil { + panic(err) + } + mw := NewMW(adminConn) + admin := NewAdmin(chatConn, adminConn) + org := NewOrg(chatConn, orgConn) adminRouterGroup := router.Group("/account") - adminRouterGroup.POST("/login", admin.AdminLogin) //登录 - adminRouterGroup.POST("/update", mw.CheckAdmin, admin.AdminUpdateInfo) //修改信息 - adminRouterGroup.POST("/info", mw.CheckAdmin, admin.AdminInfo) //获取信息 + adminRouterGroup.POST("/login", admin.AdminLogin) // 登录 + adminRouterGroup.POST("/update", mw.CheckAdmin, admin.AdminUpdateInfo) // 修改信息 + adminRouterGroup.POST("/info", mw.CheckAdmin, admin.AdminInfo) // 获取信息 defaultRouter := router.Group("/default") defaultUserRouter := defaultRouter.Group("/user", mw.CheckAdmin) - defaultUserRouter.POST("/add", admin.AddDefaultFriend) //添加注册时默认好友 - defaultUserRouter.POST("/del", admin.DelDefaultFriend) //删除注册时默认好友 - defaultUserRouter.POST("/find", admin.FindDefaultFriend) //默认好友列表 - defaultUserRouter.POST("/search", admin.SearchDefaultFriend) //搜索注册时默认好友列表 + defaultUserRouter.POST("/add", admin.AddDefaultFriend) // 添加注册时默认好友 + defaultUserRouter.POST("/del", admin.DelDefaultFriend) // 删除注册时默认好友 + defaultUserRouter.POST("/find", admin.FindDefaultFriend) // 默认好友列表 + defaultUserRouter.POST("/search", admin.SearchDefaultFriend) // 搜索注册时默认好友列表 defaultGroupRouter := defaultRouter.Group("/group") - defaultGroupRouter.POST("/add", admin.AddDefaultGroup) //添加注册时默认群 - defaultGroupRouter.POST("/del", admin.DelDefaultGroup) //删除注册时默认群 - defaultGroupRouter.POST("/find", admin.FindDefaultGroup) //获取注册时默认群列表 - defaultGroupRouter.POST("/search", admin.SearchDefaultGroup) //获取注册时默认群列表 + defaultGroupRouter.POST("/add", admin.AddDefaultGroup) // 添加注册时默认群 + defaultGroupRouter.POST("/del", admin.DelDefaultGroup) // 删除注册时默认群 + defaultGroupRouter.POST("/find", admin.FindDefaultGroup) // 获取注册时默认群列表 + defaultGroupRouter.POST("/search", admin.SearchDefaultGroup) // 获取注册时默认群列表 invitationCodeRouter := router.Group("/invitation_code", mw.CheckAdmin) - invitationCodeRouter.POST("/add", admin.AddInvitationCode) //添加邀请码 - invitationCodeRouter.POST("/gen", admin.GenInvitationCode) //生成邀请码 - invitationCodeRouter.POST("/del", admin.DelInvitationCode) //删除邀请码 - invitationCodeRouter.POST("/search", admin.SearchInvitationCode) //搜索邀请码 + invitationCodeRouter.POST("/add", admin.AddInvitationCode) // 添加邀请码 + invitationCodeRouter.POST("/gen", admin.GenInvitationCode) // 生成邀请码 + invitationCodeRouter.POST("/del", admin.DelInvitationCode) // 删除邀请码 + invitationCodeRouter.POST("/search", admin.SearchInvitationCode) // 搜索邀请码 forbiddenRouter := router.Group("/forbidden", mw.CheckAdmin) ipForbiddenRouter := forbiddenRouter.Group("/ip") - ipForbiddenRouter.POST("/add", admin.AddIPForbidden) //添加禁止注册登录IP - ipForbiddenRouter.POST("/del", admin.DelIPForbidden) //删除禁止注册登录IP - ipForbiddenRouter.POST("/search", admin.SearchIPForbidden) //搜索禁止注册登录IP + ipForbiddenRouter.POST("/add", admin.AddIPForbidden) // 添加禁止注册登录IP + ipForbiddenRouter.POST("/del", admin.DelIPForbidden) // 删除禁止注册登录IP + ipForbiddenRouter.POST("/search", admin.SearchIPForbidden) // 搜索禁止注册登录IP userForbiddenRouter := forbiddenRouter.Group("/user") - userForbiddenRouter.POST("/add", admin.AddUserIPLimitLogin) //添加限制用户在指定ip登录 - userForbiddenRouter.POST("/del", admin.DelUserIPLimitLogin) //删除用户在指定IP登录 - userForbiddenRouter.POST("/search", admin.SearchUserIPLimitLogin) //搜索限制用户在指定ip登录 + userForbiddenRouter.POST("/add", admin.AddUserIPLimitLogin) // 添加限制用户在指定ip登录 + userForbiddenRouter.POST("/del", admin.DelUserIPLimitLogin) // 删除用户在指定IP登录 + userForbiddenRouter.POST("/search", admin.SearchUserIPLimitLogin) // 搜索限制用户在指定ip登录 appletRouterGroup := router.Group("/applet", mw.CheckAdmin) - appletRouterGroup.POST("/add", admin.AddApplet) //添加小程序 - appletRouterGroup.POST("/del", admin.DelApplet) //删除小程序 - appletRouterGroup.POST("/update", admin.UpdateApplet) //修改小程序 - appletRouterGroup.POST("/search", admin.SearchApplet) //搜索小程序 + appletRouterGroup.POST("/add", admin.AddApplet) // 添加小程序 + appletRouterGroup.POST("/del", admin.DelApplet) // 删除小程序 + appletRouterGroup.POST("/update", admin.UpdateApplet) // 修改小程序 + appletRouterGroup.POST("/search", admin.SearchApplet) // 搜索小程序 blockRouter := router.Group("/block", mw.CheckAdmin) - blockRouter.POST("/add", admin.BlockUser) //封号 - blockRouter.POST("/del", admin.UnblockUser) //解封 - blockRouter.POST("/search", admin.SearchBlockUser) //搜索封号用户 + blockRouter.POST("/add", admin.BlockUser) // 封号 + blockRouter.POST("/del", admin.UnblockUser) // 解封 + blockRouter.POST("/search", admin.SearchBlockUser) // 搜索封号用户 userRouter := router.Group("/user", mw.CheckAdmin) - userRouter.POST("/password/reset", admin.ResetUserPassword) //重置用户密码 + userRouter.POST("/password/reset", admin.ResetUserPassword) // 重置用户密码 initGroup := router.Group("/client_config", mw.CheckAdmin) - initGroup.POST("/set", admin.SetClientConfig) //设置客户端初始化配置 - initGroup.POST("/get", admin.GetClientConfig) //获取客户端初始化配置 + initGroup.POST("/set", admin.SetClientConfig) // 设置客户端初始化配置 + initGroup.POST("/get", admin.GetClientConfig) // 获取客户端初始化配置 + + organizationGroup := router.Group("/organization") + organizationGroup.GET("/import_template", org.BatchImportTemplate) // 批量导入模板 + organizationGroup.Use(mw.CheckAdmin) + organizationGroup.POST("/import", org.BatchImport) // 批量导入 + //部门 增删改查 + organizationGroup.POST("/create_department", org.CreateDepartment) // 创建部门 + organizationGroup.POST("/update_department", org.UpdateDepartment) // 修改部门 + organizationGroup.POST("/delete_department", org.DeleteDepartment) // 删除部门 + organizationGroup.POST("/get_department", org.GetDepartment) // 获取部门 + + //用户 增删改查 + organizationGroup.POST("/create_organization_user", org.CreateOrganizationUser) // 创建用户 在某个部门或公司中新增 + organizationGroup.POST("/update_organization_user", org.UpdateOrganizationUser) // 修改用户信息 + organizationGroup.POST("/delete_organization_user", org.DeleteOrganizationUser) // 删除用户 + + //查询用户所在的部门信息以及个人资料 + organizationGroup.POST("/get_user_in_department", mw.CheckToken, org.GetUserInDepartment) // 获取用户所在部门 + organizationGroup.POST("/create_department_member", org.CreateDepartmentMember) // 创建部门成员 在某个部门或公司中新增 + organizationGroup.POST("/update_user_in_department", org.UpdateUserInDepartment) // 修改用户部门 + //删除 + organizationGroup.POST("/delete_user_in_department", org.DeleteUserInDepartment) // 删除部门成员 批量 + + organizationGroup.POST("/get_search_user", org.GetSearchUserList) // 搜索列表 后端 + + organizationGroup.POST("/set_organization", org.SetOrganization) // 设置公司信息 + organizationGroup.POST("/get_organization", mw.CheckToken, org.GetOrganization) // 获取公司信息 + organizationGroup.POST("/move_user_department", org.MoveUserDepartment) // 移动用户部门 + + organizationGroup.POST("/get_sub_department", org.GetSubDepartment) // 获取部门的人和同级部门 + + organizationGroup.POST("/get_search_department_user", org.GetSearchDepartmentUser) // 搜索部门和用户 + + organizationGroup.POST("/get_organization_department", org.GetOrganizationDepartment) // 获取组织部门 + + organizationGroup.POST("/sort_department", org.SortDepartmentList) + organizationGroup.POST("/sort_organization_user", org.SortOrganizationUserList) + + organizationGroup.POST("/create_new_organization_member", org.CreateNewOrganizationMember) // 创建用户的同时为其添加部门 + } diff --git a/internal/rpc/admin/admin.go b/internal/rpc/admin/admin.go index b3511befb..660f1d868 100644 --- a/internal/rpc/admin/admin.go +++ b/internal/rpc/admin/admin.go @@ -1,9 +1,27 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package admin import ( "context" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/mcontext" "github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry" + "google.golang.org/grpc" + + "github.com/OpenIMSDK/chat/pkg/common/config" "github.com/OpenIMSDK/chat/pkg/common/constant" "github.com/OpenIMSDK/chat/pkg/common/db/database" "github.com/OpenIMSDK/chat/pkg/common/db/dbutil" @@ -14,7 +32,6 @@ import ( "github.com/OpenIMSDK/chat/pkg/proto/admin" "github.com/OpenIMSDK/chat/pkg/rpclient/chat" "github.com/OpenIMSDK/chat/pkg/rpclient/openim" - "google.golang.org/grpc" ) func Start(discov discoveryregistry.SvcDiscoveryRegistry, server *grpc.Server) error { @@ -36,6 +53,12 @@ func Start(discov discoveryregistry.SvcDiscoveryRegistry, server *grpc.Server) e if err := db.AutoMigrate(tables...); err != nil { return err } + if err := database.NewAdminDatabase(db).InitAdmin(context.Background()); err != nil { + return err + } + if err := discov.CreateRpcRootNodes([]string{config.Config.RpcRegisterName.OpenImAdminName, config.Config.RpcRegisterName.OpenImChatName}); err != nil { + panic(err) + } admin.RegisterAdminServer(server, &adminServer{ Database: database.NewAdminDatabase(db), Chat: chat.NewChatClient(discov), @@ -114,8 +137,8 @@ func (o *adminServer) Login(ctx context.Context, req *admin.LoginReq) (*admin.Lo Nickname: a.Nickname, FaceURL: a.FaceURL, Level: a.Level, - IMUserID: a.UserID, - IMToken: imToken.Token, + ImUserID: a.UserID, + ImToken: imToken.Token, }, nil } diff --git a/internal/rpc/admin/applet.go b/internal/rpc/admin/applet.go index f9f5fc1c2..d9e76ea77 100644 --- a/internal/rpc/admin/applet.go +++ b/internal/rpc/admin/applet.go @@ -1,17 +1,33 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package admin import ( "context" + "strings" + "time" + "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + "github.com/google/uuid" + "github.com/OpenIMSDK/chat/pkg/common/constant" admin2 "github.com/OpenIMSDK/chat/pkg/common/db/table/admin" "github.com/OpenIMSDK/chat/pkg/common/mctx" "github.com/OpenIMSDK/chat/pkg/proto/admin" "github.com/OpenIMSDK/chat/pkg/proto/common" - "github.com/google/uuid" - "strings" - "time" ) func (o *adminServer) AddApplet(ctx context.Context, req *admin.AddAppletReq) (*admin.AddAppletResp, error) { diff --git a/internal/rpc/admin/check.go b/internal/rpc/admin/check.go index da06d1e1d..35c5ec409 100644 --- a/internal/rpc/admin/check.go +++ b/internal/rpc/admin/check.go @@ -1,8 +1,23 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package admin import ( "context" "fmt" + "github.com/OpenIMSDK/chat/pkg/common/db/dbutil" "github.com/OpenIMSDK/chat/pkg/eerrs" "github.com/OpenIMSDK/chat/pkg/proto/admin" diff --git a/internal/rpc/admin/client_config.go b/internal/rpc/admin/client_config.go index 36da106f9..500ab2a84 100644 --- a/internal/rpc/admin/client_config.go +++ b/internal/rpc/admin/client_config.go @@ -1,8 +1,24 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package admin import ( "context" + "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" + "github.com/OpenIMSDK/chat/pkg/common/mctx" "github.com/OpenIMSDK/chat/pkg/proto/admin" ) diff --git a/internal/rpc/admin/invitation.go b/internal/rpc/admin/invitation.go index 3051e6ef7..3619727bd 100644 --- a/internal/rpc/admin/invitation.go +++ b/internal/rpc/admin/invitation.go @@ -1,17 +1,33 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package admin import ( "context" + "math/rand" + "strings" + "time" + "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + "github.com/OpenIMSDK/chat/pkg/common/constant" admin2 "github.com/OpenIMSDK/chat/pkg/common/db/table/admin" "github.com/OpenIMSDK/chat/pkg/common/mctx" "github.com/OpenIMSDK/chat/pkg/eerrs" "github.com/OpenIMSDK/chat/pkg/proto/admin" - "math/rand" - "strings" - "time" ) func (o *adminServer) AddInvitationCode(ctx context.Context, req *admin.AddInvitationCodeReq) (*admin.AddInvitationCodeResp, error) { diff --git a/internal/rpc/admin/ip_forbidden.go b/internal/rpc/admin/ip_forbidden.go index 17131df70..03a221a56 100644 --- a/internal/rpc/admin/ip_forbidden.go +++ b/internal/rpc/admin/ip_forbidden.go @@ -1,11 +1,26 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package admin import ( "context" + "time" + admin2 "github.com/OpenIMSDK/chat/pkg/common/db/table/admin" "github.com/OpenIMSDK/chat/pkg/common/mctx" "github.com/OpenIMSDK/chat/pkg/proto/admin" - "time" ) func (o *adminServer) SearchIPForbidden(ctx context.Context, req *admin.SearchIPForbiddenReq) (*admin.SearchIPForbiddenResp, error) { diff --git a/internal/rpc/admin/register_add_friend.go b/internal/rpc/admin/register_add_friend.go index 61e1dd2af..c587ec295 100644 --- a/internal/rpc/admin/register_add_friend.go +++ b/internal/rpc/admin/register_add_friend.go @@ -1,15 +1,31 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package admin import ( "context" + "strings" + "time" + "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + admin2 "github.com/OpenIMSDK/chat/pkg/common/db/table/admin" "github.com/OpenIMSDK/chat/pkg/common/mctx" "github.com/OpenIMSDK/chat/pkg/proto/admin" "github.com/OpenIMSDK/chat/pkg/proto/common" - "strings" - "time" ) func (o *adminServer) AddDefaultFriend(ctx context.Context, req *admin.AddDefaultFriendReq) (*admin.AddDefaultFriendResp, error) { diff --git a/internal/rpc/admin/register_add_group.go b/internal/rpc/admin/register_add_group.go index 2f3e17530..81f3455cc 100644 --- a/internal/rpc/admin/register_add_group.go +++ b/internal/rpc/admin/register_add_group.go @@ -1,15 +1,31 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package admin import ( "context" + "strings" + "time" + "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + admin2 "github.com/OpenIMSDK/chat/pkg/common/db/table/admin" "github.com/OpenIMSDK/chat/pkg/common/mctx" "github.com/OpenIMSDK/chat/pkg/proto/admin" - "strings" - "time" ) func (o *adminServer) AddDefaultGroup(ctx context.Context, req *admin.AddDefaultGroupReq) (*admin.AddDefaultGroupResp, error) { diff --git a/internal/rpc/admin/token.go b/internal/rpc/admin/token.go index 048274c43..bd35fbfc7 100644 --- a/internal/rpc/admin/token.go +++ b/internal/rpc/admin/token.go @@ -1,28 +1,44 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package admin import ( "context" + "github.com/OpenIMSDK/chat/pkg/common/config" "github.com/OpenIMSDK/chat/pkg/common/tokenverify" "github.com/OpenIMSDK/chat/pkg/proto/admin" ) func (*adminServer) CreateToken(ctx context.Context, req *admin.CreateTokenReq) (*admin.CreateTokenResp, error) { - resp := &admin.CreateTokenResp{} - var err error - resp.Token, err = tokenverify.CreateToken(req.UserID, req.UserType, config.Config.TokenPolicy.AccessExpire) + token, err := tokenverify.CreateToken(req.UserID, req.UserType, *config.Config.TokenPolicy.Expire) if err != nil { return nil, err } - return resp, nil + return &admin.CreateTokenResp{ + Token: token, + }, nil } func (*adminServer) ParseToken(ctx context.Context, req *admin.ParseTokenReq) (*admin.ParseTokenResp, error) { - resp := &admin.ParseTokenResp{} - var err error - resp.UserID, resp.UserType, err = tokenverify.GetToken(req.Token) + userID, userType, err := tokenverify.GetToken(req.Token) if err != nil { return nil, err } - return resp, nil + return &admin.ParseTokenResp{ + UserID: userID, + UserType: userType, + }, nil } diff --git a/internal/rpc/admin/update.go b/internal/rpc/admin/update.go index c3a14c42c..937869ef9 100644 --- a/internal/rpc/admin/update.go +++ b/internal/rpc/admin/update.go @@ -1,11 +1,27 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package admin import ( "crypto/md5" "encoding/hex" + "time" + "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" + "github.com/OpenIMSDK/chat/pkg/proto/admin" - "time" ) type Admin struct { @@ -13,7 +29,7 @@ type Admin struct { Password string `gorm:"column:password;type:char(64)"` FaceURL string `gorm:"column:face_url;type:char(64)"` Nickname string `gorm:"column:nickname;type:char(64)"` - UserID string `gorm:"column:user_id;type:char(64)"` //openIM userID + UserID string `gorm:"column:user_id;type:char(64)"` // openIM userID Level int32 `gorm:"column:level;default:1" ` CreateTime time.Time `gorm:"column:create_time"` } @@ -36,7 +52,7 @@ func ToDBAdminUpdate(req *admin.AdminUpdateInfoReq) (map[string]any, error) { update["face_url"] = req.FaceURL.Value } if req.Nickname != nil { - if req.Nickname.Value != "" { + if req.Nickname.Value == "" { return nil, errs.ErrArgs.Wrap("nickname is empty") } update["nickname"] = req.Nickname.Value @@ -60,34 +76,6 @@ func ToDBAdminUpdatePassword(password string) (map[string]any, error) { return map[string]any{"password": password}, nil } -/* - Name *wrapperspb.StringValue - AppID *wrapperspb.StringValue - Icon *wrapperspb.StringValue - Url *wrapperspb.StringValue - Md5 *wrapperspb.StringValue - Size *wrapperspb.Int64Value - Version *wrapperspb.StringValue - Priority *wrapperspb.UInt32Value - Status *wrapperspb.UInt32Value - CreateTime *wrapperspb.Int64Value -*/ -/* -type Applet struct { - ID string `gorm:"column:id;primary_key;size:64"` - Name string `gorm:"column:name;size:64"` - AppID string `gorm:"column:app_id;uniqueIndex;size:255"` - Icon string `gorm:"column:icon;size:255"` - URL string `gorm:"column:url;size:255"` - MD5 string `gorm:"column:md5;size:255"` - Size int64 `gorm:"column:size"` - Version string `gorm:"column:version;size:64"` - Priority uint32 `gorm:"column:priority;size:64"` - Status uint8 `gorm:"column:status"` - CreateTime time.Time `gorm:"column:create_time;autoCreateTime;size:64"` -} -*/ - func ToDBAppletUpdate(req *admin.UpdateAppletReq) (map[string]any, error) { update := make(map[string]any) if req.Name != nil { diff --git a/internal/rpc/admin/user.go b/internal/rpc/admin/user.go index f1e86571d..f1e81f927 100644 --- a/internal/rpc/admin/user.go +++ b/internal/rpc/admin/user.go @@ -1,18 +1,34 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package admin import ( "context" + "strings" + "time" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/mcontext" "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/wrapperspb" "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + "github.com/OpenIMSDK/chat/pkg/common/db/dbutil" admin2 "github.com/OpenIMSDK/chat/pkg/common/db/table/admin" "github.com/OpenIMSDK/chat/pkg/common/mctx" "github.com/OpenIMSDK/chat/pkg/proto/admin" "github.com/OpenIMSDK/chat/pkg/proto/chat" - "strings" - "time" ) func (o *adminServer) CancellationUser(ctx context.Context, req *admin.CancellationUserReq) (*admin.CancellationUserResp, error) { diff --git a/internal/rpc/admin/user_ip_limit_login.go b/internal/rpc/admin/user_ip_limit_login.go index 15db9b0e3..8d6b69a5f 100644 --- a/internal/rpc/admin/user_ip_limit_login.go +++ b/internal/rpc/admin/user_ip_limit_login.go @@ -1,13 +1,29 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package admin import ( "context" + "time" + "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + admin2 "github.com/OpenIMSDK/chat/pkg/common/db/table/admin" "github.com/OpenIMSDK/chat/pkg/common/mctx" "github.com/OpenIMSDK/chat/pkg/proto/admin" - "time" ) func (o *adminServer) SearchUserIPLimitLogin(ctx context.Context, req *admin.SearchUserIPLimitLoginReq) (*admin.SearchUserIPLimitLoginResp, error) { diff --git a/internal/rpc/chat/callback.go b/internal/rpc/chat/callback.go index f7b07b99c..6532bc075 100644 --- a/internal/rpc/chat/callback.go +++ b/internal/rpc/chat/callback.go @@ -1,13 +1,29 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package chat import ( "context" "encoding/json" "fmt" + "github.com/OpenIMSDK/Open-IM-Server/pkg/callbackstruct" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" + constant2 "github.com/OpenIMSDK/chat/pkg/common/constant" "github.com/OpenIMSDK/chat/pkg/eerrs" "github.com/OpenIMSDK/chat/pkg/proto/chat" diff --git a/internal/rpc/chat/chat.go b/internal/rpc/chat/chat.go index d5ac633ac..f3b3a9284 100644 --- a/internal/rpc/chat/chat.go +++ b/internal/rpc/chat/chat.go @@ -1,7 +1,24 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package chat import ( "github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry" + "google.golang.org/grpc" + + "github.com/OpenIMSDK/chat/pkg/common/config" "github.com/OpenIMSDK/chat/pkg/common/db/database" chat2 "github.com/OpenIMSDK/chat/pkg/common/db/table/chat" "github.com/OpenIMSDK/chat/pkg/common/dbconn" @@ -9,7 +26,6 @@ import ( chatClient "github.com/OpenIMSDK/chat/pkg/rpclient/chat" "github.com/OpenIMSDK/chat/pkg/rpclient/openim" "github.com/OpenIMSDK/chat/pkg/sms" - "google.golang.org/grpc" ) func Start(discov discoveryregistry.SvcDiscoveryRegistry, server *grpc.Server) error { @@ -31,6 +47,9 @@ func Start(discov discoveryregistry.SvcDiscoveryRegistry, server *grpc.Server) e if err != nil { return err } + if err := discov.CreateRpcRootNodes([]string{config.Config.RpcRegisterName.OpenImAdminName, config.Config.RpcRegisterName.OpenImChatName}); err != nil { + panic(err) + } chat.RegisterChatServer(server, &chatSvr{ Database: database.NewChatDatabase(db), Admin: chatClient.NewAdminClient(discov), diff --git a/internal/rpc/chat/login.go b/internal/rpc/chat/login.go index 0d7f433fb..ee86a1429 100644 --- a/internal/rpc/chat/login.go +++ b/internal/rpc/chat/login.go @@ -1,23 +1,39 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package chat import ( "context" + "math/rand" + "strconv" + "strings" + "time" + constant2 "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/mcontext" "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + "github.com/OpenIMSDK/chat/pkg/common/config" "github.com/OpenIMSDK/chat/pkg/common/constant" "github.com/OpenIMSDK/chat/pkg/common/db/dbutil" chat2 "github.com/OpenIMSDK/chat/pkg/common/db/table/chat" "github.com/OpenIMSDK/chat/pkg/eerrs" "github.com/OpenIMSDK/chat/pkg/proto/chat" - "math/rand" - "strconv" - "strings" - "time" ) func (o *chatSvr) verifyCodeJoin(areaCode, phoneNumber string) string { diff --git a/internal/rpc/chat/password.go b/internal/rpc/chat/password.go index 613e6d120..236d07c30 100644 --- a/internal/rpc/chat/password.go +++ b/internal/rpc/chat/password.go @@ -1,8 +1,24 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package chat import ( "context" + "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" + "github.com/OpenIMSDK/chat/pkg/common/constant" "github.com/OpenIMSDK/chat/pkg/common/mctx" "github.com/OpenIMSDK/chat/pkg/proto/chat" diff --git a/internal/rpc/chat/signal.go b/internal/rpc/chat/signal.go index 5d505528c..8513087ad 100644 --- a/internal/rpc/chat/signal.go +++ b/internal/rpc/chat/signal.go @@ -1,8 +1,23 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package chat import ( "context" "errors" + "github.com/OpenIMSDK/chat/pkg/proto/chat" ) diff --git a/internal/rpc/chat/update.go b/internal/rpc/chat/update.go index b7a711b73..8cb0f2d87 100644 --- a/internal/rpc/chat/update.go +++ b/internal/rpc/chat/update.go @@ -1,9 +1,25 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package chat import ( + "time" + "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" + "github.com/OpenIMSDK/chat/pkg/proto/chat" - "time" ) func ToDBAttributeUpdate(req *chat.UpdateUserInfoReq) (map[string]any, error) { @@ -44,6 +60,9 @@ func ToDBAttributeUpdate(req *chat.UpdateUserInfoReq) (map[string]any, error) { if req.AllowVibration != nil { update["allow_vibration"] = req.AllowVibration.Value } + if req.GlobalRecvMsgOpt != nil { + update["global_recv_msg_opt"] = req.GlobalRecvMsgOpt.Value + } if len(update) == 0 { return nil, errs.ErrArgs.Wrap("no update info") } diff --git a/internal/rpc/chat/user.go b/internal/rpc/chat/user.go index ce6ef4ecd..50748dac3 100644 --- a/internal/rpc/chat/user.go +++ b/internal/rpc/chat/user.go @@ -1,14 +1,31 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package chat import ( "context" + "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/user" + "github.com/OpenIMSDK/chat/pkg/common/constant" "github.com/OpenIMSDK/chat/pkg/common/mctx" "github.com/OpenIMSDK/chat/pkg/eerrs" "github.com/OpenIMSDK/chat/pkg/proto/chat" + "github.com/OpenIMSDK/chat/pkg/proto/common" ) func (o *chatSvr) UpdateUserInfo(ctx context.Context, req *chat.UpdateUserInfoReq) (*chat.UpdateUserInfoResp, error) { @@ -188,3 +205,19 @@ func (o *chatSvr) FindAccountUser(ctx context.Context, req *chat.FindAccountUser } return &chat.FindAccountUserResp{AccountUserMap: accountUserMap}, nil } + +func (s *chatSvr) GetAccountUser(ctx context.Context, req *chat.GetAccountUserReq) (*chat.GetAccountUserResp, error) { + resp := &chat.GetAccountUserResp{CommonResp: &common.CommonResp{}} + if req.Operation == nil { + return nil, errs.ErrArgs.Wrap(" operation is nil") + } + atts, err := s.Database.GetAccountList(ctx, req.AccountList) + if err != nil { + return nil, err + } + resp.Accounts = make(map[string]string) + for _, att := range atts { + resp.Accounts[att.Account] = att.UserID + } + return resp, nil +} diff --git a/internal/rpc/chat/utils.go b/internal/rpc/chat/utils.go index 4d4141e16..6a0177211 100644 --- a/internal/rpc/chat/utils.go +++ b/internal/rpc/chat/utils.go @@ -1,9 +1,28 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package chat import ( "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + "github.com/OpenIMSDK/chat/pkg/common/db/table/chat" "github.com/OpenIMSDK/chat/pkg/proto/common" + "math/big" + "math/rand" + "strconv" + "time" ) func DbToPbAttribute(attribute *chat.Attribute) *common.UserPublicInfo { @@ -27,24 +46,36 @@ func DbToPbAttributes(attributes []*chat.Attribute) []*common.UserPublicInfo { func DbToPbUserFullInfo(attribute *chat.Attribute) *common.UserFullInfo { return &common.UserFullInfo{ - UserID: attribute.UserID, - Password: "", - Account: attribute.Account, - PhoneNumber: attribute.PhoneNumber, - AreaCode: attribute.AreaCode, - Email: attribute.Email, - Nickname: attribute.Nickname, - FaceURL: attribute.FaceURL, - Gender: attribute.Gender, - Level: attribute.Level, - //Forbidden: attribute.Forbidden, - Birth: attribute.BirthTime.UnixMilli(), - AllowAddFriend: attribute.AllowAddFriend, - AllowBeep: attribute.AllowBeep, - AllowVibration: attribute.AllowVibration, + UserID: attribute.UserID, + Password: "", + Account: attribute.Account, + PhoneNumber: attribute.PhoneNumber, + AreaCode: attribute.AreaCode, + Email: attribute.Email, + Nickname: attribute.Nickname, + FaceURL: attribute.FaceURL, + Gender: attribute.Gender, + Level: attribute.Level, + Birth: attribute.BirthTime.UnixMilli(), + AllowAddFriend: attribute.AllowAddFriend, + AllowBeep: attribute.AllowBeep, + AllowVibration: attribute.AllowVibration, + GlobalRecvMsgOpt: attribute.GlobalRecvMsgOpt, } } func DbToPbUserFullInfos(attributes []*chat.Attribute) []*common.UserFullInfo { return utils.Slice(attributes, DbToPbUserFullInfo) } +func FormatAccount(areaCode, phoneNumber, email string) string { + if phoneNumber == "" { + return email + } + return areaCode + phoneNumber +} +func GenUserID(len int) string { + r := utils.Md5(strconv.FormatInt(time.Now().UnixNano(), 10) + strconv.FormatUint(rand.Uint64(), 10)) + bi := big.NewInt(0) + bi.SetString(r[0:len], 16) + return bi.String() +} diff --git a/internal/rpc/organization/organization.go b/internal/rpc/organization/organization.go new file mode 100644 index 000000000..1d2be70a5 --- /dev/null +++ b/internal/rpc/organization/organization.go @@ -0,0 +1,1430 @@ +package organization + +import ( + "context" + "errors" + "github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry" + "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" + "github.com/OpenIMSDK/chat/pkg/common/constant" + "github.com/OpenIMSDK/chat/pkg/common/db/database" + table "github.com/OpenIMSDK/chat/pkg/common/db/table/organization" + "github.com/OpenIMSDK/chat/pkg/common/dbconn" + "github.com/OpenIMSDK/chat/pkg/proto/common" + "github.com/OpenIMSDK/chat/pkg/proto/organization" + "github.com/OpenIMSDK/chat/pkg/rpclient/openim" + organizationClient "github.com/OpenIMSDK/chat/pkg/rpclient/organization" + "google.golang.org/grpc" + "gorm.io/gorm" + "strconv" + "time" +) + +func Start(discov discoveryregistry.SvcDiscoveryRegistry, server *grpc.Server) error { + db, err := dbconn.NewGormDB() + if err != nil { + return err + } + //todo:修改 + tables := []any{ + table.Department{}, + table.DepartmentMember{}, + table.OrganizationUser{}, + table.Organization{}, + } + if err := db.AutoMigrate(tables...); err != nil { + return err + } + if err != nil { + return err + } + organization.RegisterOrganizationServer(server, &organizationSvr{ + Database: database.NewOrganizationDatabase(db), + Organization: organizationClient.NewOrgClient(discov), + OpenIM: openim.NewOpenIMClient(discov), + }) + return nil +} + +type organizationSvr struct { + Database database.OrganizationDatabaseInterface + Organization *organizationClient.OrgClient + OpenIM *openim.OpenIMClient +} + +func (o *organizationSvr) CreateDepartment(ctx context.Context, req *organization.CreateDepartmentReq) (*organization.CreateDepartmentResp, error) { + resp := &organization.CreateDepartmentResp{DepartmentInfo: &common.Department{}} + if req.DepartmentInfo == nil { + return nil, errs.ErrArgs.Wrap(" req.DepartmentInfo is nil") + } + department := table.Department{ + DepartmentID: genDepartmentID(), + FaceURL: req.DepartmentInfo.FaceURL, + Name: req.DepartmentInfo.Name, + ParentID: req.DepartmentInfo.ParentID, + Order: req.DepartmentInfo.Order, + DepartmentType: req.DepartmentInfo.DepartmentType, + RelatedGroupID: req.DepartmentInfo.RelatedGroupID, + CreateTime: time.UnixMilli(req.DepartmentInfo.CreateTime), + } + if department.DepartmentID == "" { + department.DepartmentID = strconv.FormatInt(time.Now().Unix(), 10) + } + if req.DepartmentInfo.ParentID != "" { + _, err := o.Database.GetDepartmentByID(ctx, req.DepartmentInfo.ParentID) + if errors.Is(err, gorm.ErrRecordNotFound) { + return nil, errs.ErrArgs.Wrap("parent department not found") + } else if err != nil { + return nil, err + } + } + if err := o.Database.CreateDepartment(ctx, &department); err != nil { + return nil, err + } + return resp, nil +} + +func (o *organizationSvr) UpdateDepartment(ctx context.Context, req *organization.UpdateDepartmentReq) (*organization.UpdateDepartmentResp, error) { + resp := &organization.UpdateDepartmentResp{} + + if req.DepartmentInfo == nil { + return nil, errs.ErrArgs.Wrap(" req.DepartmentInfo is nil") + } + err := o.Database.UpdateDepartment(ctx, &table.Department{ + DepartmentID: req.DepartmentInfo.DepartmentID, + FaceURL: req.DepartmentInfo.FaceURL, + Name: req.DepartmentInfo.Name, + ParentID: req.DepartmentInfo.ParentID, + Order: req.DepartmentInfo.Order, + DepartmentType: req.DepartmentInfo.DepartmentType, + RelatedGroupID: req.DepartmentInfo.RelatedGroupID, + }) + if req.DepartmentInfo.ParentID != "" { + _, err := o.Database.GetDepartmentByID(ctx, req.DepartmentInfo.ParentID) + if errors.Is(err, gorm.ErrRecordNotFound) { + return nil, errs.ErrArgs.Wrap("parent department not found") + } else if err != nil { + return nil, err + } + } + if err != nil { + return nil, err + } + + return resp, nil +} + +func (o *organizationSvr) GetOrganizationDepartment(ctx context.Context, req *organization.GetOrganizationDepartmentReq) (*organization.GetOrganizationDepartmentResp, error) { + resp := &organization.GetOrganizationDepartmentResp{DepartmentList: []*organization.DepartmentInfo{}} + + numMap, err := o.GetDepartmentMemberNum(ctx, "") + if err != nil { + return nil, err + } + var getSubDepartmentList func(departmentId string, list *[]*organization.DepartmentInfo) error + getSubDepartmentList = func(departmentId string, list *[]*organization.DepartmentInfo) error { + departments, err := o.Database.GetParent(ctx, departmentId) + if err != nil { + return err + } + for _, department := range departments { + subs := make([]*organization.DepartmentInfo, 0) + err = getSubDepartmentList(department.DepartmentID, &subs) + if err != nil { + return err + } + *list = append(*list, &organization.DepartmentInfo{ + Department: &common.Department{ + DepartmentID: department.DepartmentID, + FaceURL: department.FaceURL, + Name: department.Name, + ParentID: department.ParentID, + Order: department.Order, + DepartmentType: department.DepartmentType, + RelatedGroupID: department.RelatedGroupID, + CreateTime: department.CreateTime.UnixMilli(), + MemberNum: uint32(numMap[department.DepartmentID]), + }, + SubDepartmentList: subs, + }) + } + return nil + } + + if err := getSubDepartmentList("", &resp.DepartmentList); err != nil { + return nil, err + } + return resp, nil +} + +func (o *organizationSvr) DeleteDepartment(ctx context.Context, req *organization.DeleteDepartmentReq) (*organization.DeleteDepartmentResp, error) { + resp := &organization.DeleteDepartmentResp{} + departmentList, err := o.Database.GetList(ctx, req.DepartmentIDList) + if err != nil { + return nil, err + } + if len(departmentList) == 0 { + return nil, errs.ErrArgs.Wrap("parent department not found") + } + // 修改删除的子部门的父部门为删除的上级 + for _, department := range departmentList { + err := o.Database.UpdateParentID(ctx, department.DepartmentID, department.ParentID) + if err != nil { + return nil, err + } + } + // 删除部门 + if err := o.Database.DeleteDepartment(ctx, req.DepartmentIDList); err != nil { + return nil, err + } + // 删除职位信息 + if err := o.Database.DeleteDepartmentIDList(ctx, req.DepartmentIDList); err != nil { + return nil, err + } + return resp, nil +} + +func (o *organizationSvr) GetDepartment(ctx context.Context, req *organization.GetDepartmentReq) (*organization.GetDepartmentResp, error) { + resp := &organization.GetDepartmentResp{} + + department, err := o.Database.GetDepartment(ctx, req.DepartmentID) + if err == nil { + resp.Department = &common.Department{ + DepartmentID: department.DepartmentID, + FaceURL: department.FaceURL, + Name: department.Name, + ParentID: department.ParentID, + Order: department.Order, + DepartmentType: department.DepartmentType, + RelatedGroupID: department.RelatedGroupID, + CreateTime: department.CreateTime.UnixMilli(), + } + } else if errors.Is(err, gorm.ErrRecordNotFound) { + return nil, errs.ErrArgs.Wrap("department not found") + } else { + return nil, err + } + + return resp, nil +} + +func (o *organizationSvr) CreateOrganizationUser(ctx context.Context, req *organization.CreateOrganizationUserReq) (*organization.CreateOrganizationUserResp, error) { + resp := &organization.CreateOrganizationUserResp{} + if req.OrganizationUser == nil { + return nil, errs.ErrArgs.Wrap(" req.OrganizationUser is nil") + } + err := o.Database.CreateOrganizationUser(ctx, &table.OrganizationUser{ + UserID: req.OrganizationUser.UserID, + Nickname: req.OrganizationUser.Nickname, + EnglishName: req.OrganizationUser.EnglishName, + FaceURL: req.OrganizationUser.FaceURL, + Gender: req.OrganizationUser.Gender, + Mobile: req.OrganizationUser.Mobile, + Telephone: req.OrganizationUser.Telephone, + Birth: time.UnixMilli(req.OrganizationUser.Birth), + Email: req.OrganizationUser.Email, + Status: req.OrganizationUser.Status, + Station: req.OrganizationUser.Station, + AreaCode: req.OrganizationUser.AreaCode, + }) + if err != nil { + return nil, err + } + return resp, nil +} + +func (o *organizationSvr) UpdateOrganizationUser(ctx context.Context, req *organization.UpdateOrganizationUserReq) (*organization.UpdateOrganizationUserResp, error) { + resp := &organization.UpdateOrganizationUserResp{} + if req.OrganizationUser == nil { + return nil, errs.ErrArgs.Wrap(" req.OrganizationUser is nil") + } + err := o.Database.UpdateOrganizationUser(ctx, &table.OrganizationUser{ + UserID: req.OrganizationUser.UserID, + Nickname: req.OrganizationUser.Nickname, + EnglishName: req.OrganizationUser.EnglishName, + FaceURL: req.OrganizationUser.FaceURL, + Gender: req.OrganizationUser.Gender, + Mobile: req.OrganizationUser.Mobile, + Telephone: req.OrganizationUser.Telephone, + Birth: time.UnixMilli(req.OrganizationUser.Birth), + Email: req.OrganizationUser.Email, + Status: req.OrganizationUser.Status, + Station: req.OrganizationUser.Station, + AreaCode: req.OrganizationUser.AreaCode, + }) + if err != nil { + return nil, err + } + return resp, nil +} + +func (o *organizationSvr) DeleteOrganizationUser(ctx context.Context, req *organization.DeleteOrganizationUserReq) (*organization.DeleteOrganizationUserResp, error) { + resp := &organization.DeleteOrganizationUserResp{} + err := o.Database.DeleteOrganizationUser(ctx, req.UserID) + if err != nil { + return nil, err + } + err = o.Database.DeleteDepartmentMemberByUserID(ctx, req.UserID) + if err != nil { + return nil, err + } + return resp, nil +} + +func (o *organizationSvr) CreateDepartmentMember(ctx context.Context, req *organization.CreateDepartmentMemberReq) (*organization.CreateDepartmentMemberResp, error) { + //todo:departmentid或userId不存在报错 + resp := &organization.CreateDepartmentMemberResp{} + if req.DepartmentMember == nil { + return nil, errs.ErrArgs.Wrap("req.DepartmentInfo is nil") + } + var terminationTime *time.Time + if req.DepartmentMember.TerminationTime != constant.NilTimestamp { + t := time.UnixMilli(req.DepartmentMember.EntryTime) + terminationTime = &t + } + err := o.Database.CreateDepartmentMember(ctx, &table.DepartmentMember{ + UserID: req.DepartmentMember.UserID, + DepartmentID: req.DepartmentMember.DepartmentID, + Order: req.DepartmentMember.Order, + Position: req.DepartmentMember.Position, + Leader: req.DepartmentMember.Leader, + Status: req.DepartmentMember.Status, + EntryTime: time.UnixMilli(req.DepartmentMember.EntryTime), + TerminationTime: terminationTime, + }) + if err != nil { + return nil, err + } + return resp, nil +} + +func (o *organizationSvr) GetUserInDepartment(ctx context.Context, req *organization.GetUserInDepartmentReq) (*organization.GetUserInDepartmentResp, error) { + resp := &organization.GetUserInDepartmentResp{} + user, err := o.Database.GetOrganizationUser(ctx, req.UserID) + if errors.Is(err, gorm.ErrRecordNotFound) { + return nil, errs.ErrArgs.Wrap("user not fount") + } else if err != nil { + return nil, err + } + dms, err := o.Database.GetDepartmentMemberByUserID(ctx, req.UserID) + if err != nil { + return nil, err + } + departmentIDList := make([]string, 0, len(dms)) + for _, dm := range dms { + departmentIDList = append(departmentIDList, dm.DepartmentID) + } + departmentList, err := o.Database.GetList(ctx, departmentIDList) + if err != nil { + return nil, err + } + numMap, err := o.GetDepartmentMemberNum(ctx, "") + if err != nil { + return nil, err + } + departmentMap := make(map[string]*common.Department) + for _, department := range departmentList { + departmentMap[department.DepartmentID] = &common.Department{ + DepartmentID: department.DepartmentID, + FaceURL: department.FaceURL, + Name: department.Name, + ParentID: department.ParentID, + Order: department.Order, + DepartmentType: department.DepartmentType, + RelatedGroupID: department.RelatedGroupID, + CreateTime: department.CreateTime.UnixMilli(), + MemberNum: uint32(numMap[department.DepartmentID]), + } + } + resp.UserInDepartment = &common.UserInDepartment{ + OrganizationUser: &common.OrganizationUser{ + UserID: user.UserID, + Nickname: user.Nickname, + EnglishName: user.EnglishName, + FaceURL: user.FaceURL, + Gender: user.Gender, + Mobile: user.Mobile, + Telephone: user.Telephone, + Birth: user.Birth.UnixMilli(), + Email: user.Email, + Order: user.Order, + Status: user.Status, + CreateTime: user.CreateTime.Unix(), + Ex: "", + Station: user.Station, + AreaCode: user.AreaCode, + }, + DepartmentMemberList: make([]*common.DepartmentMember, len(dms)), + } + for i, dm := range dms { + var terminationTime int64 + if dm.TerminationTime == nil { + terminationTime = constant.NilTimestamp + } else { + terminationTime = dm.TerminationTime.UnixMilli() + } + resp.UserInDepartment.DepartmentMemberList[i] = &common.DepartmentMember{ + UserID: dm.UserID, + DepartmentID: dm.DepartmentID, + Order: dm.Order, + Position: dm.Position, + Leader: dm.Leader, + Status: dm.Status, + Ex: "", + EntryTime: dm.EntryTime.UnixMilli(), + TerminationTime: terminationTime, + Department: departmentMap[dm.DepartmentID], + } + } + return resp, nil +} + +func (o *organizationSvr) DeleteUserInDepartment(ctx context.Context, req *organization.DeleteUserInDepartmentReq) (*organization.DeleteUserInDepartmentResp, error) { + resp := &organization.DeleteUserInDepartmentResp{} + err := o.Database.DeleteDepartmentMemberByKey(ctx, req.UserID, req.DepartmentID) + if err != nil { + return nil, err + } + return resp, nil +} + +func (o *organizationSvr) UpdateUserInDepartment(ctx context.Context, req *organization.UpdateUserInDepartmentReq) (*organization.UpdateUserInDepartmentResp, error) { + resp := &organization.UpdateUserInDepartmentResp{} + if req.DepartmentMember == nil { + return nil, errs.ErrArgs.Wrap(" req.DepartmentInfo is nil") + } + var ( + entryTime time.Time + terminationTime *time.Time + ) + if req.DepartmentMember.EntryTime != constant.NilTimestamp { + entryTime = time.UnixMilli(req.DepartmentMember.EntryTime) + } + if req.DepartmentMember.TerminationTime != constant.NilTimestamp { + t := time.UnixMilli(req.DepartmentMember.TerminationTime) + terminationTime = &t + } + err := o.Database.UpdateDepartmentMember(ctx, &table.DepartmentMember{ + UserID: req.DepartmentMember.UserID, + DepartmentID: req.DepartmentMember.DepartmentID, + Order: req.DepartmentMember.Order, + Position: req.DepartmentMember.Position, + Leader: req.DepartmentMember.Leader, + Status: req.DepartmentMember.Status, + EntryTime: entryTime, + TerminationTime: terminationTime, + }) + if err != nil { + return nil, err + } + return resp, nil +} + +func (o *organizationSvr) GetSearchUserList(ctx context.Context, req *organization.GetSearchUserListReq) (*organization.GetSearchUserListResp, error) { + resp := &organization.GetSearchUserListResp{UserList: []*common.UserInDepartment{}} + var userIDList []string + if len(req.DepartmentIDList) > 0 { + departments, err := o.Database.FindDepartmentMember(ctx, req.DepartmentIDList) + if err != nil { + return nil, err + } + if len(departments) == 0 { + return resp, nil + } + userIDList = make([]string, len(departments)) + for i, department := range departments { + userIDList[i] = department.UserID + } + } + total, users, err := o.Database.SearchPage(ctx, req.PositionList, userIDList, req.Text, req.Sorts, req.PageNumber, req.ShowNumber) + if err != nil { + return nil, err + } + resp.Total = total + findUserIDList := make([]string, len(users)) + for i, user := range users { + findUserIDList[i] = user.UserID + } + departmentMemberList, err := o.Database.FindDepartmentMemberByUserID(ctx, findUserIDList) + if err != nil { + return nil, err + } + departmentIDList := make([]string, 0, len(departmentMemberList)) + for _, member := range departmentMemberList { + departmentIDList = append(departmentIDList, member.DepartmentID) + } + departmentList, err := o.Database.GetList(ctx, departmentIDList) + if err != nil { + return nil, err + } + departmentMap := make(map[string]*common.Department) + for _, department := range departmentList { + departmentMap[department.DepartmentID] = &common.Department{ + DepartmentID: department.DepartmentID, + FaceURL: department.FaceURL, + Name: department.Name, + ParentID: department.ParentID, + Order: department.Order, + DepartmentType: department.DepartmentType, + RelatedGroupID: department.RelatedGroupID, + CreateTime: department.CreateTime.UnixMilli(), + } + } + departmentMemberMap := make(map[string][]*common.DepartmentMember) + for _, member := range departmentMemberList { + var terminationTime int64 + if member.TerminationTime == nil { + terminationTime = constant.NilTimestamp + } else { + terminationTime = member.TerminationTime.UnixMilli() + } + departmentMemberMap[member.UserID] = append(departmentMemberMap[member.UserID], &common.DepartmentMember{ + UserID: member.UserID, + DepartmentID: member.DepartmentID, + Order: member.Order, + Position: member.Position, + Leader: member.Leader, + Status: member.Status, + Ex: "", + EntryTime: member.EntryTime.UnixMilli(), + TerminationTime: terminationTime, + CreateTime: member.CreateTime.UnixMilli(), + Department: departmentMap[member.DepartmentID], + }) + } + for _, user := range users { + departmentMembers := departmentMemberMap[user.UserID] + if departmentMembers == nil { + departmentMembers = []*common.DepartmentMember{} + } + resp.UserList = append(resp.UserList, &common.UserInDepartment{ + DepartmentMemberList: departmentMembers, + OrganizationUser: &common.OrganizationUser{ + UserID: user.UserID, + Nickname: user.Nickname, + EnglishName: user.EnglishName, + FaceURL: user.FaceURL, + Gender: user.Gender, + Mobile: user.Mobile, + Telephone: user.Telephone, + Birth: user.Birth.UnixMilli(), + Email: user.Email, + Order: user.Order, + Status: user.Status, + CreateTime: user.CreateTime.UnixMilli(), + Ex: "", + Station: user.Station, + AreaCode: user.AreaCode, + }, + }) + } + return resp, nil +} + +func (o *organizationSvr) SetOrganization(ctx context.Context, req *organization.SetOrganizationReq) (*organization.SetOrganizationResp, error) { + resp := &organization.SetOrganizationResp{} + if req.Organization == nil { + return nil, errs.ErrArgs.Wrap(" req.Organization is nil") + } + err := o.Database.SetOrganization(ctx, &table.Organization{ + LogoURL: req.Organization.LogoURL, + Name: req.Organization.Name, + Homepage: req.Organization.Homepage, + RelatedGroupID: req.Organization.RelatedGroupID, + Introduction: req.Organization.Introduction, + }) + if err != nil { + return nil, err + } + return resp, nil +} + +func (o *organizationSvr) GetOrganization(ctx context.Context, req *organization.GetOrganizationReq) (*organization.GetOrganizationResp, error) { + resp := &organization.GetOrganizationResp{} + org, err := o.Database.GetOrganization(ctx) + if err != nil { + return nil, err + } + resp.Organization = &common.Organization{ + LogoURL: org.LogoURL, + Name: org.Name, + Homepage: org.Homepage, + RelatedGroupID: org.RelatedGroupID, + Introduction: org.Introduction, + CreateTime: org.CreateTime.UnixMilli(), + } + return resp, nil +} + +func (o *organizationSvr) GetSubDepartment(ctx context.Context, req *organization.GetSubDepartmentReq) (*organization.GetSubDepartmentResp, error) { + resp := &organization.GetSubDepartmentResp{ + DepartmentMemberList: []*common.DepartmentMember{}, + DepartmentList: []*common.Department{}, + DepartmentDirectoryList: []*common.Department{}, + } + departmentList, err := o.Database.GetParent(ctx, req.DepartmentID) + if err != nil { + return nil, err + } + memberCountMap, err := o.GetDepartmentMemberNum(ctx, req.DepartmentID) + if err != nil { + return nil, errs.ErrArgs.Wrap(" get num ", err.Error()) + } + for _, department := range departmentList { + resp.DepartmentList = append(resp.DepartmentList, &common.Department{ + DepartmentID: department.DepartmentID, + FaceURL: department.FaceURL, + Name: department.Name, + ParentID: department.ParentID, + Order: department.Order, + DepartmentType: department.DepartmentType, + RelatedGroupID: department.RelatedGroupID, + CreateTime: department.CreateTime.UnixMilli(), + MemberNum: uint32(memberCountMap[department.DepartmentID]), + }) + } + if req.DepartmentID == "" { + userIDList, err := o.Database.GetNoDepartmentUserIDList(ctx) + if err != nil { + return nil, err + } + organizationUserList, err := o.Database.GetOrganizationUserList(ctx, userIDList) + if err != nil { + return nil, err + } + departmentMemberList, err := o.Database.GetUserListInDepartment(ctx, req.DepartmentID, userIDList) + if err != nil { + return nil, err + } + departmentMemberMap := make(map[string]*table.DepartmentMember) + for i, member := range departmentMemberList { + departmentMemberMap[member.UserID] = departmentMemberList[i] + } + for _, user := range organizationUserList { + member := departmentMemberMap[user.UserID] + resp.DepartmentMemberList = append(resp.DepartmentMemberList, &common.DepartmentMember{ + UserID: user.UserID, + DepartmentID: member.DepartmentID, + Order: member.Order, + Position: member.Position, + Leader: member.Leader, + Status: member.Status, + Ex: "", + EntryTime: constant.NilTimestamp, + TerminationTime: constant.NilTimestamp, + CreateTime: constant.NilTimestamp, + Department: nil, + OrganizationUser: &common.OrganizationUser{ + UserID: user.UserID, + Nickname: user.Nickname, + EnglishName: user.EnglishName, + FaceURL: user.FaceURL, + Gender: user.Gender, + Mobile: user.Mobile, + Telephone: user.Telephone, + Birth: user.Birth.UnixMilli(), + Email: user.Email, + Status: user.Status, + Order: user.Order, + CreateTime: user.CreateTime.UnixMilli(), + Ex: "", + Station: user.Station, + AreaCode: user.AreaCode, + }, + }) + } + } else { + departmentMemberList, err := o.Database.GetDepartmentMemberByDepartmentID(ctx, req.DepartmentID) + if err != nil { + return nil, err + } + userIDList := make([]string, len(departmentMemberList)) + for i, member := range departmentMemberList { + userIDList[i] = member.UserID + } + userList, err := o.Database.GetOrganizationUserList(ctx, userIDList) + if err != nil { + return nil, err + } + userMap := make(map[string]*common.OrganizationUser) + for _, user := range userList { + userMap[user.UserID] = &common.OrganizationUser{ + UserID: user.UserID, + Nickname: user.Nickname, + EnglishName: user.EnglishName, + FaceURL: user.FaceURL, + Gender: user.Gender, + Mobile: user.Mobile, + Telephone: user.Telephone, + Birth: user.Birth.UnixMilli(), + Email: user.Email, + Order: user.Order, + Status: user.Status, + CreateTime: user.CreateTime.UnixMilli(), + Ex: "", + Station: user.Station, + AreaCode: user.AreaCode, + } + } + for _, member := range departmentMemberList { + var terminationTime int64 + if member.TerminationTime == nil { + terminationTime = constant.NilTimestamp + } else { + terminationTime = member.TerminationTime.UnixMilli() + } + resp.DepartmentMemberList = append(resp.DepartmentMemberList, &common.DepartmentMember{ + UserID: member.UserID, + DepartmentID: member.DepartmentID, + Order: member.Order, + Position: member.Position, + Leader: member.Leader, + Status: member.Status, + Ex: "", + EntryTime: member.EntryTime.UnixMilli(), + TerminationTime: terminationTime, + CreateTime: member.CreateTime.UnixMilli(), + OrganizationUser: userMap[member.UserID], + }) + } + } + var ds []*common.Department + if req.DepartmentID != "" { + departmentID := req.DepartmentID + for { + department, err := o.Database.GetDepartment(ctx, departmentID) + if err != nil { + if errors.Is(err, gorm.ErrRecordNotFound) { + break + } + return nil, err + } + ds = append(ds, &common.Department{ + DepartmentID: department.DepartmentID, + FaceURL: department.FaceURL, + Name: department.Name, + ParentID: department.ParentID, + Order: department.Order, + DepartmentType: department.DepartmentType, + RelatedGroupID: department.RelatedGroupID, + CreateTime: department.CreateTime.UnixMilli(), + }) + if department.ParentID == "" { + break + } + departmentID = department.ParentID + } + } + org, err := o.Database.GetOrganization(ctx) + if err != nil { + return nil, err + } + ds = append(ds, &common.Department{ + DepartmentID: "", + FaceURL: org.LogoURL, + Name: org.Name, + CreateTime: org.CreateTime.UnixMilli(), + }) + resp.DepartmentDirectoryList = make([]*common.Department, 0, len(ds)) + for i := len(ds) - 1; i >= 0; i-- { + resp.DepartmentDirectoryList = append(resp.DepartmentDirectoryList, ds[i]) + } + return resp, nil +} + +func (o *organizationSvr) GetSearchDepartmentUser(ctx context.Context, req *organization.GetSearchDepartmentUserReq) (*organization.GetSearchDepartmentUserResp, error) { + resp := &organization.GetSearchDepartmentUserResp{ + OrganizationUserList: []*organization.GetSearchDepartmentUserOrganizationUser{}, + DepartmentList: []*common.Department{}, + } + organizationUserList, err := o.Database.SearchOrganizationUser(ctx, nil, nil, req.Keyword, nil) + if err != nil { + return nil, err + } + org, err := o.Database.GetOrganization(ctx) + if err != nil { + return nil, err + } + orgDepartment := &common.Department{ + DepartmentID: "", + FaceURL: org.LogoURL, + Name: org.Name, + ParentID: "", + Order: 0, + DepartmentType: 0, + RelatedGroupID: org.RelatedGroupID, + CreateTime: org.CreateTime.UnixMilli(), + } + for _, user := range organizationUserList { + departmentMemberList, err := o.Database.GetDepartmentMemberByUserID(ctx, user.UserID) + if err != nil { + return nil, err + } + organizationUser := &common.OrganizationUser{ + UserID: user.UserID, + Nickname: user.Nickname, + EnglishName: user.EnglishName, + FaceURL: user.FaceURL, + Gender: user.Gender, + Mobile: user.Mobile, + Telephone: user.Telephone, + Birth: user.Birth.UnixMilli(), + Email: user.Email, + Order: user.Order, + Status: user.Status, + CreateTime: user.CreateTime.UnixMilli(), + Ex: "", + Station: user.Station, + AreaCode: user.AreaCode, + } + var res []*common.Department + if len(departmentMemberList) > 0 { + for _, member := range departmentMemberList { + if rootDepartment, err := o.Database.GetDepartment(ctx, member.DepartmentID); err == nil { + var departmentList []*table.Department + departmentList = append(departmentList, rootDepartment) + parentID := rootDepartment.ParentID + for { + if parentID == "" { + break + } + subDepartment, err := o.Database.GetDepartment(ctx, parentID) + if err == nil { + departmentList = append(departmentList, subDepartment) + parentID = subDepartment.ParentID + } else if errors.Is(err, gorm.ErrRecordNotFound) { + break + } else { + return nil, err + } + } + res = make([]*common.Department, 0, len(departmentList)+1) + res = append(res, orgDepartment) + for i := len(departmentList) - 1; i >= 0; i-- { + item := departmentList[i] + res = append(res, &common.Department{ + DepartmentID: item.DepartmentID, + FaceURL: item.FaceURL, + Name: item.Name, + ParentID: item.ParentID, + Order: item.Order, + DepartmentType: item.DepartmentType, + RelatedGroupID: item.RelatedGroupID, + CreateTime: item.CreateTime.UnixMilli(), + Position: member.Position, + }) + } + } else if errors.Is(err, gorm.ErrRecordNotFound) { + res = []*common.Department{orgDepartment} + } else { + return nil, err + } + if req.IsGetAllDepartment { + resp.OrganizationUserList = append(resp.OrganizationUserList, &organization.GetSearchDepartmentUserOrganizationUser{ + DepartmentList: res, + OrganizationUser: organizationUser, + Position: member.Position, + }) + } + } + } + if !req.IsGetAllDepartment { + resp.OrganizationUserList = append(resp.OrganizationUserList, &organization.GetSearchDepartmentUserOrganizationUser{ + DepartmentList: res, + OrganizationUser: organizationUser, + }) + } + } + return resp, nil +} + +func (o *organizationSvr) SortDepartmentList(ctx context.Context, req *organization.SortDepartmentListReq) (*organization.SortDepartmentListResp, error) { + resp := &organization.SortDepartmentListResp{} + if req.DepartmentID == req.NextDepartmentID { + return nil, errs.ErrArgs.Wrap("department id equal") + } + idList := append(make([]string, 0, 3), req.DepartmentID) + if req.ParentID != "" { + if req.ParentID == req.DepartmentID || req.ParentID == req.NextDepartmentID { + return nil, errs.ErrArgs.Wrap("parent department id error") + } + idList = append(idList, req.ParentID) + } + if req.NextDepartmentID != "" { + idList = append(idList, req.NextDepartmentID) + } + departments, err := o.Database.GetList(ctx, idList) + if err != nil { + return nil, err + } + if len(idList) != len(departments) { + return nil, errs.ErrArgs.Wrap("department id not found") + } + if req.NextDepartmentID == "" { // 添加到最后一个 + order, err := o.Database.GetMaxOrder(ctx, req.ParentID) + if err != nil { + return nil, errs.ErrArgs.Wrap(" get max order " + err.Error()) + } + order++ + if order == 0 { + order++ + } + err = o.Database.UpdateDepartment(ctx, &table.Department{ + DepartmentID: req.DepartmentID, + ParentID: req.ParentID, + Order: order, + }) + if err != nil { + return nil, errs.ErrArgs.Wrap("update" + err.Error()) + } + } else { + var nextDepartment *table.Department + for i := 0; i < len(departments); i++ { + if departments[i].DepartmentID == req.NextDepartmentID { + nextDepartment = departments[i] + break + } + } + if nextDepartment == nil { + return nil, err + } + if err := o.Database.UpdateOrderIncrement(ctx, nextDepartment.ParentID, nextDepartment.Order); err != nil { + return nil, errs.ErrArgs.Wrap(" get max order " + err.Error()) + } + err = o.Database.UpdateParentIDOrder(ctx, req.DepartmentID, req.ParentID, nextDepartment.Order) + if err != nil { + return nil, errs.ErrArgs.Wrap(" update " + err.Error()) + } + } + return resp, nil +} + +func (o *organizationSvr) SortOrganizationUserList(ctx context.Context, req *organization.SortOrganizationUserListReq) (*organization.SortOrganizationUserListResp, error) { + return nil, errs.ErrInternalServer.Wrap("not implement") +} + +func (o *organizationSvr) CreateNewOrganizationMember(ctx context.Context, req *organization.CreateNewOrganizationMemberReq) (*organization.CreateNewOrganizationMemberResp, error) { + resp := &organization.CreateNewOrganizationMemberResp{} + if req.OrganizationUser == nil { + return nil, errs.ErrArgs.Wrap("req.OrganizationUser is nil") + } + if req.UserIdentity == nil { + return nil, errs.ErrArgs.Wrap(" req.UserIdentity is nil") + } + if req.UserIdentity.Account == "" { + return nil, errs.ErrArgs.Wrap("account is empty") + } + + if len(req.DepartmentMemberList) > 0 { + departmentIDList := make([]string, 0, len(req.DepartmentMemberList)) + for _, member := range req.DepartmentMemberList { + departmentIDList = append(departmentIDList, member.DepartmentID) + } + departments, err := o.Database.GetList(ctx, departmentIDList) + if err != nil { + return nil, err + } + if len(departments) != len(departmentIDList) { + return nil, errs.ErrArgs.Wrap("department not existence") + } + } + if req.OrganizationUser.UserID == "" { + req.OrganizationUser.UserID = GenUserID() + } + user := &table.OrganizationUser{ + UserID: req.OrganizationUser.UserID, + Nickname: req.OrganizationUser.Nickname, + EnglishName: req.OrganizationUser.EnglishName, + FaceURL: req.OrganizationUser.FaceURL, + Gender: req.OrganizationUser.Gender, + Mobile: req.OrganizationUser.Mobile, + Telephone: req.OrganizationUser.Telephone, + Birth: time.UnixMilli(req.OrganizationUser.Birth), + Email: req.OrganizationUser.Email, + Order: req.OrganizationUser.Order, + Status: req.OrganizationUser.Status, + Station: req.OrganizationUser.Station, + AreaCode: req.OrganizationUser.AreaCode, + } + if _, err := o.Database.GetOrganizationUser(ctx, user.UserID); err == nil { + return nil, errs.ErrArgs.Wrap("has registered") + } else if !errors.Is(err, gorm.ErrRecordNotFound) { + return nil, err + } + if user.Nickname == "" && user.EnglishName == "" { + return nil, errs.ErrArgs.Wrap("nickname and englishName is empty") + } + if err := o.Database.CreateOrganizationUser(ctx, user); err != nil { + return nil, err + } + if len(req.DepartmentMemberList) > 0 { + members := make([]*table.DepartmentMember, 0) + for _, member := range req.DepartmentMemberList { + var terminationTime *time.Time + if member.TerminationTime != constant.NilTimestamp { + t := time.UnixMilli(member.TerminationTime) + terminationTime = &t + } + members = append(members, &table.DepartmentMember{ + UserID: user.UserID, + DepartmentID: member.DepartmentID, + Order: member.Order, + Position: member.Position, + Leader: member.Leader, + Status: member.Status, + EntryTime: time.UnixMilli(member.EntryTime), + TerminationTime: terminationTime, + }) + } + if err := o.Database.CreateDepartmentMemberList(ctx, members); err != nil { + return nil, err + } + } + return resp, nil +} + +func (o *organizationSvr) GetUserInfo(ctx context.Context, req *organization.GetUserInfoReq) (*organization.GetUserInfoResp, error) { + resp := &organization.GetUserInfoResp{} + + user, err := o.Database.GetOrganizationUser(ctx, req.UserID) + if err != nil { + if errors.Is(err, gorm.ErrRecordNotFound) { + return nil, errs.ErrArgs.Wrap("user id not found") + } else { + return nil, err + } + } + + memberList, err := o.Database.GetDepartmentMemberByUserID(ctx, req.UserID) + if err != nil { + return nil, err + } + + departmentMap := make(map[string]*common.Department) + if len(memberList) > 0 { + departmentIDList := make([]string, 0, len(memberList)) + for _, member := range memberList { + departmentIDList = append(departmentIDList, member.DepartmentID) + } + departmentList, err := o.Database.GetList(ctx, departmentIDList) + if err != nil { + return nil, err + } + for _, department := range departmentList { + departmentMap[department.DepartmentID] = &common.Department{ + DepartmentID: department.DepartmentID, + FaceURL: department.FaceURL, + Name: department.Name, + ParentID: department.ParentID, + Order: department.Order, + DepartmentType: department.DepartmentType, + RelatedGroupID: department.RelatedGroupID, + CreateTime: department.CreateTime.UnixMilli(), + } + } + } + + resp.User = &common.OrganizationUser{ + UserID: user.UserID, + Nickname: user.Nickname, + EnglishName: user.EnglishName, + FaceURL: user.FaceURL, + Gender: user.Gender, + Mobile: user.Mobile, + Telephone: user.Telephone, + Birth: user.Birth.UnixMilli(), + Email: user.Email, + Order: user.Order, + Status: user.Status, + CreateTime: user.CreateTime.UnixMilli(), + DepartmentMemberList: make([]*common.DepartmentMember, 0, len(memberList)), + Station: user.Station, + AreaCode: user.AreaCode, + } + + for _, member := range memberList { + var terminationTime int64 + if member.TerminationTime == nil { + terminationTime = constant.NilTimestamp + } else { + terminationTime = member.TerminationTime.UnixMilli() + } + resp.User.DepartmentMemberList = append(resp.User.DepartmentMemberList, &common.DepartmentMember{ + UserID: member.UserID, + DepartmentID: member.DepartmentID, + Order: member.Order, + Position: member.Position, + Leader: member.Leader, + Status: member.Status, + EntryTime: member.EntryTime.UnixMilli(), + TerminationTime: terminationTime, + CreateTime: member.CreateTime.UnixMilli(), + Department: departmentMap[member.DepartmentID], + }) + } + + return resp, nil +} + +func (o *organizationSvr) BatchImport(ctx context.Context, req *organization.BatchImportReq) (*organization.BatchImportResp, error) { + resp := &organization.BatchImportResp{} + + createDepartment := func(department *table.Department) error { + department.DepartmentID = genDepartmentID() + return o.Database.CreateDepartment(ctx, department) + } + + if len(req.DepartmentList) > 0 { + for _, department := range req.DepartmentList { + var parentID string + for _, name := range department.ParentDepartmentName.HierarchyName { + if name == "" { + return nil, errs.ErrArgs.Wrap("department name is empty") + } + d, err := o.Database.GetDepartmentByName(ctx, name, parentID) + if errors.Is(err, gorm.ErrRecordNotFound) { + d = &table.Department{ + Name: name, + ParentID: parentID, + } + if err = createDepartment(d); err != nil { + return resp, nil + } + return nil, err + } else if err != nil { + return nil, err + } + parentID = d.DepartmentID + } + } + } + + if len(req.UserList) > 0 { + var ( + reqs = make([]*organization.CreateNewOrganizationMemberReq, 0, len(req.UserList)) + idList = make([]string, 0, len(req.UserList)) + ) + + for _, user := range req.UserList { + departmentIDList := make([]string, 0, len(user.UserDepartmentNameList)) + positions := make([]string, 0, len(user.UserDepartmentNameList)) + + for _, nameList := range user.UserDepartmentNameList { + var parentID string + for _, name := range nameList.HierarchyName { + if name == "" { + return nil, errs.ErrArgs.Wrap("department name is empty") + } + d, err := o.Database.GetDepartmentByName(ctx, name, parentID) + if errors.Is(err, gorm.ErrRecordNotFound) { + d = &table.Department{ + Name: name, + ParentID: parentID, + } + if err = createDepartment(d); err != nil { + return nil, errs.ErrArgs.Wrap("create not found department") + } + return nil, err + } else if err != nil { + return nil, err + } + parentID = d.DepartmentID + } + departmentIDList = append(departmentIDList, parentID) + positions = append(positions, nameList.Position) + } + + departmentMemberList := make([]*common.DepartmentMember, 0, len(user.UserDepartmentNameList)) + + for i, departmentID := range departmentIDList { + departmentMemberList = append(departmentMemberList, &common.DepartmentMember{ + UserID: user.UserID, + DepartmentID: departmentID, + Position: positions[i], + }) + } + + idList = append(idList, user.UserID) + + reqs = append(reqs, &organization.CreateNewOrganizationMemberReq{ + OrganizationUser: &common.OrganizationUser{ + UserID: user.UserID, + Nickname: user.Nickname, + EnglishName: user.EnglishName, + FaceURL: user.FaceURL, + Gender: user.Gender, + Mobile: user.Mobile, + Telephone: user.Telephone, + Birth: user.Birth, + Email: user.Email, + Order: user.Order, + Status: user.Status, + Station: user.Station, + AreaCode: user.AreaCode, + }, + DepartmentMemberList: departmentMemberList, + UserIdentity: &common.UserIdentity{ + Account: user.Account, + Password: user.Password, + }, + }) + } + + users, err := o.Database.GetOrganizationUserList(ctx, idList) + if err != nil { + return nil, err + } + + if len(users) != 0 { + return nil, err + } + + for i := 0; i < len(reqs); i++ { + _, err := o.CreateNewOrganizationMember(context.Background(), reqs[i]) + if err != nil { + return nil, err + } + } + } + return resp, nil +} + +func (o *organizationSvr) MoveUserDepartment(ctx context.Context, req *organization.MoveUserDepartmentReq) (*organization.MoveUserDepartmentResp, error) { + resp := &organization.MoveUserDepartmentResp{} + + if len(req.MoveUserDepartmentList) == 0 { + return nil, errs.ErrArgs.Wrap("move user department list is empty") + } + + tx, err := o.Database.BeginTransaction(ctx) + if err != nil { + return nil, err + } + + for _, d := range req.MoveUserDepartmentList { + if _, err := o.Database.GetOrganizationUser(ctx, d.UserID); err != nil { + return nil, err + } + if _, err := o.Database.GetDepartment(ctx, d.DepartmentID); err != nil { + return nil, err + } + if d.CurrentDepartmentID != "" { + if err := o.Database.DeleteDepartmentMemberByKey(ctx, d.UserID, d.CurrentDepartmentID); err != nil { + return resp, err + } + } + var terminationTime *time.Time + if d.TerminationTime != constant.NilTimestamp { + t := time.UnixMilli(d.TerminationTime) + terminationTime = &t + } + + _, err := o.Database.GetDepartmentMemberByKey(ctx, d.UserID, d.DepartmentID) + if err == nil { + continue + } else if !errors.Is(err, gorm.ErrRecordNotFound) { + return nil, errs.ErrArgs.Wrap("record") + } + + m := table.DepartmentMember{ + UserID: d.UserID, + DepartmentID: d.DepartmentID, + Order: d.Order, + Position: d.Position, + Leader: d.Leader, + Status: d.Status, + EntryTime: time.UnixMilli(d.EntryTime), + TerminationTime: terminationTime, + } + if err := o.Database.CreateDepartmentMember(ctx, &m); err != nil { + return nil, err + } + } + + if err := tx.Commit().Error; err != nil { + return nil, err + } + + return resp, nil +} + +func (o *organizationSvr) GetUserFullList(ctx context.Context, req *organization.GetUserFullListReq) (*organization.GetUserFullListResp, error) { + resp := &organization.GetUserFullListResp{} + var ( + total int64 + users []*table.OrganizationUser + err error + ) + if len(req.UserIDList) == 0 { + if req.ShowNumber == 0 { + req.ShowNumber = 10 + } + total, users, err = o.Database.GetPage(ctx, int(req.PageNumber), int(req.ShowNumber)) + } else { + users, err = o.Database.GetOrganizationUserList(ctx, req.UserIDList) + total = int64(len(users)) + } + if err != nil { + return nil, err + } + resp.Total = int32(total) + for _, user := range users { + members, err := o.Database.GetDepartmentMemberByUserID(ctx, user.UserID) + if err != nil { + return nil, err + } + departmentIDList := make([]string, 0, len(members)) + for _, member := range members { + departmentIDList = append(departmentIDList, member.DepartmentID) + } + departments, err := o.Database.GetList(ctx, departmentIDList) + if err != nil { + return nil, err + } + departmentMap := make(map[string]*common.Department) + for _, department := range departments { + departmentMap[department.DepartmentID] = &common.Department{ + DepartmentID: department.DepartmentID, + FaceURL: department.FaceURL, + Name: department.Name, + ParentID: department.ParentID, + Order: department.Order, + DepartmentType: department.DepartmentType, + RelatedGroupID: department.RelatedGroupID, + CreateTime: department.CreateTime.UnixMilli(), + } + } + var departmentMemberList []*common.DepartmentMember + for _, member := range members { + department := departmentMap[member.DepartmentID] + if department == nil { + continue + } + var terminationTime int64 + if member.TerminationTime == nil { + terminationTime = constant.NilTimestamp + } else { + terminationTime = member.TerminationTime.UnixMilli() + } + departmentMemberList = append(departmentMemberList, &common.DepartmentMember{ + UserID: member.UserID, + DepartmentID: member.DepartmentID, + Order: member.Order, + Position: member.Position, + Leader: member.Leader, + Status: member.Status, + EntryTime: member.EntryTime.UnixMilli(), + TerminationTime: terminationTime, + CreateTime: member.CreateTime.UnixMilli(), + Department: department, + }) + } + resp.OrganizationUserList = append(resp.OrganizationUserList, &common.OrganizationUser{ + UserID: user.UserID, + Nickname: user.Nickname, + EnglishName: user.EnglishName, + FaceURL: user.FaceURL, + Gender: user.Gender, + Mobile: user.Mobile, + Telephone: user.Telephone, + Birth: user.Birth.UnixMilli(), + Email: user.Email, + Order: user.Order, + Status: user.Status, + CreateTime: user.CreateTime.UnixMilli(), + DepartmentMemberList: departmentMemberList, + Station: user.Station, + AreaCode: user.AreaCode, + }) + } + return resp, nil +} + +func (o *organizationSvr) SearchUsersFullInfo(ctx context.Context, req *organization.SearchUsersFullInfoReq) (*organization.SearchUsersFullInfoResp, error) { + resp := &organization.SearchUsersFullInfoResp{} + if req.Operation == nil || req.Pagination == nil || req.UserPublicInfo == nil { + return nil, errs.ErrArgs.Wrap("req.Operation or req.Pagination or req.UserPublicInfo is nil") + } + if req.Pagination.ShowNumber == 0 { + req.Pagination.ShowNumber = 10 + } + var userIDList []string + if req.UserPublicInfo.UserID != "" { + userIDList = append(userIDList, req.UserPublicInfo.UserID) + } + total, users, err := o.Database.SearchV2(ctx, req.Content, userIDList, int(req.Pagination.PageNumber), int(req.Pagination.ShowNumber)) + if err != nil { + return nil, err + } + resp.Total = int32(total) + for _, user := range users { + members, err := o.Database.GetDepartmentMemberByUserID(ctx, user.UserID) + + if err != nil { + return resp, err + } + departmentIDList := make([]string, 0, len(members)) + for _, member := range members { + departmentIDList = append(departmentIDList, member.DepartmentID) + } + departments, err := o.Database.GetList(ctx, departmentIDList) + if err != nil { + return resp, err + } + departmentMap := make(map[string]*common.Department) + for _, department := range departments { + departmentMap[department.DepartmentID] = &common.Department{ + DepartmentID: department.DepartmentID, + FaceURL: department.FaceURL, + Name: department.Name, + ParentID: department.ParentID, + Order: department.Order, + DepartmentType: department.DepartmentType, + RelatedGroupID: department.RelatedGroupID, + CreateTime: department.CreateTime.UnixMilli(), + } + } + var departmentMemberList []*common.DepartmentMember + for _, member := range members { + department := departmentMap[member.DepartmentID] + if department == nil { + continue + } + var terminationTime int64 + if member.TerminationTime == nil { + terminationTime = constant.NilTimestamp + } else { + terminationTime = member.TerminationTime.UnixMilli() + } + departmentMemberList = append(departmentMemberList, &common.DepartmentMember{ + UserID: member.UserID, + DepartmentID: member.DepartmentID, + Order: member.Order, + Position: member.Position, + Leader: member.Leader, + Status: member.Status, + EntryTime: member.EntryTime.UnixMilli(), + TerminationTime: terminationTime, + CreateTime: member.CreateTime.UnixMilli(), + Department: department, + }) + } + resp.OrganizationUserList = append(resp.OrganizationUserList, &common.OrganizationUser{ + UserID: user.UserID, + Nickname: user.Nickname, + EnglishName: user.EnglishName, + FaceURL: user.FaceURL, + Gender: user.Gender, + Mobile: user.Mobile, + Telephone: user.Telephone, + Birth: user.Birth.UnixMilli(), + Email: user.Email, + Order: user.Order, + Status: user.Status, + CreateTime: user.CreateTime.UnixMilli(), + DepartmentMemberList: departmentMemberList, + Station: user.Station, + AreaCode: user.AreaCode, + }) + } + return resp, nil +} diff --git a/internal/rpc/organization/utils.go b/internal/rpc/organization/utils.go new file mode 100644 index 000000000..97393d834 --- /dev/null +++ b/internal/rpc/organization/utils.go @@ -0,0 +1,137 @@ +package organization + +import ( + "context" + "math/big" + "math/rand" + "strconv" + "time" + + "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" +) + +func genDepartmentID() string { + r := utils.Md5(strconv.FormatInt(time.Now().UnixNano(), 10) + strconv.FormatUint(rand.Uint64(), 10)) + bi := big.NewInt(0) + bi.SetString(r[0:8], 16) + return bi.String() +} + +func GenUserID() string { + r := utils.Md5(strconv.FormatInt(time.Now().UnixNano(), 10) + strconv.FormatUint(rand.Uint64(), 10)) + bi := big.NewInt(0) + bi.SetString(r[0:8], 16) + return bi.String() +} + +func GenDepartmentID() string { + r := utils.Md5(strconv.FormatInt(time.Now().UnixNano(), 10) + strconv.FormatUint(rand.Uint64(), 10)) + bi := big.NewInt(0) + bi.SetString(r[0:8], 16) + return bi.String() +} + +func (o *organizationSvr) GetDepartmentMemberNum(ctx context.Context, parentID string) (map[string]int, error) { + type Department struct { + //DepartmentName string // 部门名 + DepartmentID string // 部门ID + ParentDepartment *Department // 父部门 + ChildrenDepartmentList []*Department // 子部门 + } + + var departmentIDList []string // 涉及的所有部门ID + + var bottomDepartmentList []*Department // 没有子部门 + + var traversalDepartment func(parent *Department) error + traversalDepartment = func(parent *Department) error { + departmentIDList = append(departmentIDList, parent.DepartmentID) + departments, err := o.Database.GetParent(ctx, parent.DepartmentID) + if err != nil { + return err + } + if len(departments) == 0 { + return nil + } + for _, department := range departments { + departmentIDList = append(departmentIDList, department.DepartmentID) + children := &Department{ + //DepartmentName: department.Name, + DepartmentID: department.DepartmentID, + ParentDepartment: parent, + } + parent.ChildrenDepartmentList = append(parent.ChildrenDepartmentList, children) + if err := traversalDepartment(children); err != nil { + return err + } + if len(children.ChildrenDepartmentList) == 0 { + bottomDepartmentList = append(bottomDepartmentList, children) + } + } + return nil + } + + root := &Department{ + DepartmentID: parentID, + } + + if err := traversalDepartment(root); err != nil { + return nil, err + } + + members, err := o.Database.FindDepartmentMember(ctx, departmentIDList) + if err != nil { + return nil, err + } + + departmentMemberMap := make(map[string][]string) // 部门ID: []用户ID + + for _, member := range members { + departmentMemberMap[member.DepartmentID] = append(departmentMemberMap[member.DepartmentID], member.UserID) + } + + departmentChildrenDepartment := make(map[string][]string) // 每个部门下的所有子部门ID + + for i := 0; i < len(bottomDepartmentList); i++ { + department := bottomDepartmentList[i] + departmentChildrenDepartment[department.DepartmentID] = []string{} + parent := department.ParentDepartment + children := []string{department.DepartmentID} + for { + if parent == nil || parent == root { + break + } + children = append(children, parent.DepartmentID) + departmentChildrenDepartment[parent.DepartmentID] = append(departmentChildrenDepartment[parent.DepartmentID], children...) + parent = parent.ParentDepartment + } + } + + duplicateRemoval := func(arr []string) []string { + var ( + res = make([]string, 0, len(arr)) + exist = make(map[string]struct{}) + ) + for _, val := range arr { + if _, ok := exist[val]; !ok { + exist[val] = struct{}{} + res = append(res, val) + } + } + return res + } + + res := make(map[string]int) + + for departmentID, childrenDepartmentIDList := range departmentChildrenDepartment { + var userIDList []string + userIDList = append(userIDList, departmentMemberMap[departmentID]...) // 当前部门成员 + for _, childrenDepartmentID := range childrenDepartmentIDList { + userIDList = append(userIDList, departmentMemberMap[childrenDepartmentID]...) // 子部门成员 + } + userIDList = duplicateRemoval(userIDList) + res[departmentID] = len(userIDList) + } + + return res, nil +} diff --git a/pkg/common/config/config.go b/pkg/common/config/config.go index 6f8efaeae..ec5199fbe 100644 --- a/pkg/common/config/config.go +++ b/pkg/common/config/config.go @@ -2,8 +2,12 @@ package config import _ "embed" -//go:embed version -var Version string +var ( + //go:embed version + Version string + //go:embed template.xlsx + ImportTemplate []byte +) var Config struct { Zookeeper struct { @@ -15,42 +19,44 @@ var Config struct { ChatApi struct { GinPort []int `yaml:"openImChatApiPort"` ListenIP string `yaml:"listenIP"` - } + } `yaml:"chatApi"` AdminApi struct { GinPort []int `yaml:"openImAdminApiPort"` ListenIP string `yaml:"listenIP"` - } + } `yaml:"adminApi"` RpcPort struct { - OpenImAdminPort []int `yaml:"openImAdminPort"` - OpenImChatPort []int `yaml:"openImChatPort"` - } `yaml:"rpcport"` + OpenImAdminPort []int `yaml:"openImAdminPort"` + OpenImChatPort []int `yaml:"openImChatPort"` + OpenImOrganizationPort []int `yaml:"openImOrganizationPort"` + } `yaml:"rpcPort"` RpcRegisterName struct { - OpenImAdminName string `yaml:"openImAdminName"` - OpenImChatName string `yaml:"openImChatName"` - } `yaml:"rpcregistername"` + OpenImAdminName string `yaml:"openImAdminName"` + OpenImChatName string `yaml:"openImChatName"` + OpenImOrganizationName string `yaml:"openImOrganizationName"` + } `yaml:"rpcRegisterName"` Mysql struct { - DBAddress *[]string `yaml:"dbMysqlAddress"` - DBUserName *string `yaml:"dbMysqlUserName"` - DBPassword *string `yaml:"dbMysqlPassword"` - DBDatabaseName *string `yaml:"dbMysqlDatabaseName"` - DBMaxOpenConns *int `yaml:"dbMaxOpenConns"` - DBMaxIdleConns *int `yaml:"dbMaxIdleConns"` - DBMaxLifeTime *int `yaml:"dbMaxLifeTime"` - LogLevel *int `yaml:"logLevel"` - SlowThreshold *int `yaml:"slowThreshold"` - } + Address *[]string `yaml:"address"` + Username *string `yaml:"username"` + Password *string `yaml:"password"` + Database *string `yaml:"database"` + MaxOpenConn *int `yaml:"maxOpenConn"` + MaxIdleConn *int `yaml:"maxIdleConn"` + MaxLifeTime *int `yaml:"maxLifeTime"` + LogLevel *int `yaml:"logLevel"` + SlowThreshold *int `yaml:"slowThreshold"` + } `yaml:"mysql"` Log struct { StorageLocation *string `yaml:"storageLocation"` RotationTime *int `yaml:"rotationTime"` RemainRotationCount *uint `yaml:"remainRotationCount"` RemainLogLevel *int `yaml:"remainLogLevel"` IsStdout *bool `yaml:"isStdout"` - WithStack *bool `yaml:"withStack"` IsJson *bool `yaml:"isJson"` - } + WithStack *bool `yaml:"withStack"` + } `yaml:"log"` + Secret *string `yaml:"secret"` TokenPolicy struct { - AccessSecret string `yaml:"accessSecret"` - AccessExpire int64 `yaml:"accessExpire"` + Expire *int64 `yaml:"expire"` } `yaml:"tokenPolicy"` VerifyCode struct { ValidTime int `yaml:"validTime"` @@ -65,7 +71,8 @@ var Config struct { AccessKeySecret string `yaml:"accessKeySecret"` SignName string `yaml:"signName"` VerificationCodeTemplateCode string `yaml:"verificationCodeTemplateCode"` - } - } - ProxyHeader string `yaml:"proxyheader"` + } `yaml:"ali"` + } `yaml:"verifyCode"` + ProxyHeader string `yaml:"proxyHeader"` + ImportTemplate string `yaml:"importTemplate"` } diff --git a/pkg/common/config/parse.go b/pkg/common/config/parse.go index 57428419f..ba1c47ab0 100644 --- a/pkg/common/config/parse.go +++ b/pkg/common/config/parse.go @@ -1,8 +1,22 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package config import ( "bytes" - "encoding/json" + "errors" "fmt" openIMConfig "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" @@ -52,21 +66,35 @@ func InitConfig() error { if err != nil { return fmt.Errorf("conn zk error: %w", err) } - openIMConfigData, err := zk.GetConfFromRegistry(constant.OpenIMCommonConfigKey) - if err != nil { - return fmt.Errorf("get zk config: %w", err) + var openIMConfigData []byte + for i := 0; i < 100; i++ { + var err error + configData, err := zk.GetConfFromRegistry(constant.OpenIMCommonConfigKey) + if err != nil { + fmt.Printf("get zk config [%d] error: %v\n", i, err) + time.Sleep(time.Second) + continue + } + if len(configData) == 0 { + fmt.Printf("get zk config [%d] data is empty\n", i) + time.Sleep(time.Second) + continue + } + openIMConfigData = configData + } + if len(openIMConfigData) == 0 { + return errors.New("get zk config data failed") } if err := yaml.NewDecoder(bytes.NewReader(openIMConfigData)).Decode(&openIMConfig.Config); err != nil { return fmt.Errorf("parse zk openIMConfig: %w", err) } - - configFieldCopy(&Config.Mysql.DBAddress, openIMConfig.Config.Mysql.DBAddress) - configFieldCopy(&Config.Mysql.DBUserName, openIMConfig.Config.Mysql.DBUserName) - configFieldCopy(&Config.Mysql.DBPassword, openIMConfig.Config.Mysql.DBPassword) - configFieldCopy(&Config.Mysql.DBDatabaseName, openIMConfig.Config.Mysql.DBDatabaseName) - configFieldCopy(&Config.Mysql.DBMaxOpenConns, openIMConfig.Config.Mysql.DBMaxOpenConns) - configFieldCopy(&Config.Mysql.DBMaxIdleConns, openIMConfig.Config.Mysql.DBMaxIdleConns) - configFieldCopy(&Config.Mysql.DBMaxLifeTime, openIMConfig.Config.Mysql.DBMaxLifeTime) + configFieldCopy(&Config.Mysql.Address, openIMConfig.Config.Mysql.Address) + configFieldCopy(&Config.Mysql.Username, openIMConfig.Config.Mysql.Username) + configFieldCopy(&Config.Mysql.Password, openIMConfig.Config.Mysql.Password) + configFieldCopy(&Config.Mysql.Database, openIMConfig.Config.Mysql.Database) + configFieldCopy(&Config.Mysql.MaxOpenConn, openIMConfig.Config.Mysql.MaxOpenConn) + configFieldCopy(&Config.Mysql.MaxIdleConn, openIMConfig.Config.Mysql.MaxIdleConn) + configFieldCopy(&Config.Mysql.MaxLifeTime, openIMConfig.Config.Mysql.MaxLifeTime) configFieldCopy(&Config.Mysql.LogLevel, openIMConfig.Config.Mysql.LogLevel) configFieldCopy(&Config.Mysql.SlowThreshold, openIMConfig.Config.Mysql.SlowThreshold) @@ -78,11 +106,14 @@ func InitConfig() error { configFieldCopy(&Config.Log.WithStack, openIMConfig.Config.Log.WithStack) configFieldCopy(&Config.Log.IsJson, openIMConfig.Config.Log.IsJson) - jsonData, err := json.Marshal(Config) + configFieldCopy(&Config.Secret, openIMConfig.Config.Secret) + configFieldCopy(&Config.TokenPolicy.Expire, openIMConfig.Config.TokenPolicy.Expire) + + configData, err := yaml.Marshal(&Config) if err != nil { return err } - fmt.Println(string(jsonData)) + fmt.Printf("%s\nconfig:\n%s\n", time.Now(), string(configData)) return nil } diff --git a/pkg/common/config/template.xlsx b/pkg/common/config/template.xlsx new file mode 100644 index 000000000..a81926cf8 Binary files /dev/null and b/pkg/common/config/template.xlsx differ diff --git a/pkg/common/constant/constant.go b/pkg/common/constant/constant.go index e017f540b..325c6ad85 100644 --- a/pkg/common/constant/constant.go +++ b/pkg/common/constant/constant.go @@ -1,9 +1,23 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package constant import "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" const ( - //verificationCode used for + // verificationCode used for. VerificationCodeForRegister = 1 // 注册 VerificationCodeForResetPassword = 2 // 重置密码 VerificationCodeForLogin = 3 // 登录 @@ -15,45 +29,45 @@ const ( const LogFileName = "chat.log" -// block unblock +// block unblock. const ( BlockUser = 1 UnblockUser = 2 ) -// AccountType +// AccountType. const ( Email = "email" Phone = "phone" Account = "account" ) -// Mode +// Mode. const ( UserMode = "user" AdminMode = "admin" ) -// user level +// user level. const ( OrdinaryUserLevel = 1 AdvancedUserLevel = 100 ) -// AddFriendCtrl +// AddFriendCtrl. const ( - OrdinaryUserAddFriendEnable = 1 //允许普通用户添加好友 - OrdinaryUserAddFriendDisable = -1 //不允许普通用户添加好友 + OrdinaryUserAddFriendEnable = 1 // 允许普通用户添加好友 + OrdinaryUserAddFriendDisable = -1 // 不允许普通用户添加好友 ) -// minioUpload +// minioUpload. const ( OtherType = 1 VideoType = 2 ImageType = 3 ) -// callback Action +// callback Action. const ( ActionAllow = 0 ActionForbidden = 1 @@ -65,7 +79,7 @@ const ( ScreenInvitationRegisterNotUsed = 2 // 未使用 ) -// 1 block; 2 unblock +// 1 block; 2 unblock. const ( UserBlock = 1 // 封号 UserUnblock = 2 // 解封 @@ -106,7 +120,7 @@ const ( NeedInvitationCodeRegister = 1 // 需要邀请码 ) -// 小程序 +// 小程序. const ( StatusOnShelf = 1 // 上架 StatusUnShelf = 2 // 下架 @@ -133,12 +147,11 @@ const ( InvitationCodeAll = 2 // 未使用 ) -// 默认发现页面 +// 默认发现页面. const DefaultDiscoverPageURL = "https://doc.rentsoft.cn/#/" -//const OperationID = "operationID" -//const OpUserID = "opUserID" - +// const OperationID = "operationID" +// const OpUserID = "opUserID". const ( RpcOperationID = constant.OperationID RpcOpUserID = constant.OpUserID diff --git a/pkg/common/constant/error.go b/pkg/common/constant/error.go new file mode 100644 index 000000000..c5aca23f2 --- /dev/null +++ b/pkg/common/constant/error.go @@ -0,0 +1,228 @@ +package constant + +import "errors" + +type ErrInfo struct { + ErrCode int32 + ErrMsg string +} + +func (e ErrInfo) Error() string { + return e.ErrMsg +} + +func (e ErrInfo) Code() int32 { + return e.ErrCode +} + +//var ( +// OK = ErrInfo{0, ""} +// ErrServer = ErrInfo{500, "server error"} +// +// ErrParseToken = ErrInfo{700, ParseTokenMsg.Error()} +// +// ErrTencentCredential = ErrInfo{400, ThirdPartyMsg.Error()} +// +// ErrTokenKicked = ErrInfo{706, TokenUserKickedMsg.Error()} +// ErrTokenDifferentPlatformID = ErrInfo{707, TokenDifferentPlatformIDMsg.Error()} +// ErrTokenDifferentUserID = ErrInfo{708, TokenDifferentUserIDMsg.Error()} +// +// ErrStatus = ErrInfo{ErrCode: 804, ErrMsg: StatusMsg.Error()} +// ErrCallback = ErrInfo{ErrCode: 809, ErrMsg: CallBackMsg.Error()} +// ErrSendLimit = ErrInfo{ErrCode: 810, ErrMsg: "send msg limit, to many request, try again later"} +// ErrMessageHasReadDisable = ErrInfo{ErrCode: 811, ErrMsg: "message has read disable"} +// +// //通用错误 +// ErrArgs = ErrInfo{ErrCode: FormattingError, ErrMsg: "Parameter failed"} +// ErrDB = ErrInfo{ErrCode: DatabaseError, ErrMsg: " operation database failed "} +// ErrRpcProcess = ErrInfo{ErrCode: ServerError, ErrMsg: " rpc process failed "} +// ErrGetRpcConn = ErrInfo{ErrCode: ServerError, ErrMsg: " get grpc node failed "} +// ErrRecordNotFound = ErrInfo{ErrCode: RecordNotFound, ErrMsg: " record not found "} +// //登录相关 +// ErrNotAdmin = ErrInfo{ErrCode: NotAdmin, ErrMsg: "not admin"} +// ErrHasNotRegistered = ErrInfo{ErrCode: HasNotRegistered, ErrMsg: "account is not registered"} +// ErrPasswordError = ErrInfo{ErrCode: PasswordError, ErrMsg: "password error"} +// +// //token相关 +// ErrTokenExpired = ErrInfo{TokenExpired, "token expired"} +// ErrTokenMalformed = ErrInfo{TokenMalformed, "token format error"} +// ErrTokenNotValidYet = ErrInfo{TokenNotValidYet, "token not valid yet"} +// ErrTokenUnknown = ErrInfo{TokenUnknown, "token unknown error"} +// ErrCreateToken = ErrInfo{CreateToken, "create token error"} +// +// //没有权限 +// ErrNoPermission = ErrInfo{ErrCode: NoPermission, ErrMsg: "no permission"} +//) +// +//var ( +// ParseTokenMsg = errors.New("parse token failed") +// TokenUserKickedMsg = errors.New("user has been kicked") +// TokenDifferentPlatformIDMsg = errors.New("different platformID") +// TokenDifferentUserIDMsg = errors.New("different userID") +// StatusMsg = errors.New("status is abnormal") +// ArgsMsg = errors.New("args failed") +// CallBackMsg = errors.New("callback failed") +// InvitationMsg = errors.New("invitationCode error") +// +// ThirdPartyMsg = errors.New("third party error") +//) +// +//// 通用错误码 +//const ( +// NoError = 0 //无错误 +// FormattingError = 10001 //输入参数错误 +// DatabaseError = 10002 //redis/mysql等db错误 +// +// ServerError = 10003 // +// HttpError = 10004 // +// GetIMTokenError = 10005 //获取OpenIM token失败 +// RecordNotFound = 10006 //记录不存在 +// +// NoPermission = 10007 +//) +// +//// 注册相关错误 +//const ( +// HasRegistered = 20001 //账号已经注册 +// RepeatSendCode = 20002 //重复发送验证码 +// InvitationInvalid = 20003 //邀请码错误 +// RegisterLimit = 20004 //注册受ip限制 +//) +// +//// 验证码 邀请码相关 +//const ( +// CodeInvalid = 30001 //验证码错误 +// CodeExpired = 30002 //验证码已过期 +// //InvitationUsed = 30003 //邀请码已被使用 +// +// InvitationCodeUsed = 30003 // 邀请码被使用 +// InvitationCodeNonExistent = 30004 // 邀请码不存在 +//) +// +//// 登录相关 +//const ( +// HasNotRegistered = 40001 //账号未注册 +// PasswordError = 40002 //密码错误 +// LoginLimit = 40003 //登录受ip限制 +// IPForbidden = 40004 //ip禁止 登录 注册 +// DisableLogin = 40005 // 账号封禁 +// NotAdmin = 41000 //非管理员 +//) +// +//const ( +// TokenExpired = 50001 +// TokenMalformed = 50002 +// TokenNotValidYet = 50003 +// TokenUnknown = 50004 +// CreateToken = 50005 +//) + +var ( + OK = ErrInfo{0, ""} + ErrServer = ErrInfo{500, "server error"} + + ErrParseToken = ErrInfo{700, ParseTokenMsg.Error()} + + ErrTencentCredential = ErrInfo{400, ThirdPartyMsg.Error()} + + ErrTokenKicked = ErrInfo{706, TokenUserKickedMsg.Error()} + ErrTokenDifferentPlatformID = ErrInfo{707, TokenDifferentPlatformIDMsg.Error()} + ErrTokenDifferentUserID = ErrInfo{708, TokenDifferentUserIDMsg.Error()} + + ErrStatus = ErrInfo{ErrCode: 804, ErrMsg: StatusMsg.Error()} + ErrCallback = ErrInfo{ErrCode: 809, ErrMsg: CallBackMsg.Error()} + ErrSendLimit = ErrInfo{ErrCode: 810, ErrMsg: "send msg limit, to many request, try again later"} + ErrMessageHasReadDisable = ErrInfo{ErrCode: 811, ErrMsg: "message has read disable"} + + //通用错误 + ErrArgs = ErrInfo{ErrCode: FormattingError, ErrMsg: "Parameter failed"} + ErrDB = ErrInfo{ErrCode: DatabaseError, ErrMsg: " operation database failed "} + ErrRpcProcess = ErrInfo{ErrCode: ServerError, ErrMsg: " rpc process failed "} + ErrGetRpcConn = ErrInfo{ErrCode: ServerError, ErrMsg: " get grpc node failed "} + ErrRecordNotFound = ErrInfo{ErrCode: RecordNotFound, ErrMsg: " record not found "} + //登录相关 + ErrNotAdmin = ErrInfo{ErrCode: NotAdmin, ErrMsg: "not admin"} + ErrHasNotRegistered = ErrInfo{ErrCode: HasNotRegistered, ErrMsg: "account is not registered"} + ErrPasswordError = ErrInfo{ErrCode: PasswordError, ErrMsg: "password error"} + + //token相关 + ErrTokenExpired = ErrInfo{TokenExpired, "token expired"} + ErrTokenMalformed = ErrInfo{TokenMalformed, "token format error"} + ErrTokenNotValidYet = ErrInfo{TokenNotValidYet, "token not valid yet"} + ErrTokenUnknown = ErrInfo{TokenUnknown, "token unknown error"} + ErrCreateToken = ErrInfo{CreateToken, "create token error"} + + //没有权限 + ErrNoPermission = ErrInfo{ErrCode: NoPermission, ErrMsg: "no permission"} +) + +var ( + ParseTokenMsg = errors.New("parse token failed") + TokenUserKickedMsg = errors.New("user has been kicked") + TokenDifferentPlatformIDMsg = errors.New("different platformID") + TokenDifferentUserIDMsg = errors.New("different userID") + StatusMsg = errors.New("status is abnormal") + ArgsMsg = errors.New("args failed") + CallBackMsg = errors.New("callback failed") + InvitationMsg = errors.New("invitationCode error") + ThirdPartyMsg = errors.New("third party error") +) + +// 通用错误码 +const ( + NoError = 0 //无错误 + FormattingError = 10001 //输入参数错误 + DatabaseError = 10002 //redis/mysql等db错误 + + ServerError = 10003 // + HttpError = 10004 // + GetIMTokenError = 10005 //获取OpenIM token失败 + RecordNotFound = 10006 //记录不存在 + + NoPermission = 10007 +) + +// 注册相关错误 +const ( + HasRegistered = 20001 //账号已经注册 + RepeatSendCode = 20002 //重复发送验证码 + InvitationInvalid = 20003 //邀请码错误 + RegisterLimit = 20004 //注册受ip限制 +) + +// 验证码 邀请码相关 +const ( + CodeInvalid = 30001 //验证码错误 + CodeExpired = 30002 //验证码已过期 + //InvitationUsed = 30003 //邀请码已被使用 + InvitationCodeNonExistent = 30004 // 邀请码不存在 +) + +// 登录相关 +const ( + HasNotRegistered = 40001 //账号未注册 + PasswordError = 40002 //密码错误 + LoginLimit = 40003 //登录受ip限制 + IPForbidden = 40004 //ip禁止 登录 注册 + DisableLogin = 40005 // 账号封禁 + VerificationCodeError = 40006 + NotAdmin = 41000 //非管理员 + NotChat = 41001 //非用户 +) + +// token相关错误 +const ( + TokenExpired = 50001 //过期 + TokenMalformed = 50002 //格式错误 + TokenNotValidYet = 50003 //不存在 + TokenUnknown = 50004 //未知错误 + CreateToken = 50005 //创建错误 +) + +const ( + GenderFemale = 0 // 女 + GenderMale = 1 // 男 + GenderUnknown = 2 // 未知 +) + +const NilTimestamp = 0 // *time.Time == nil 对应的时间戳 diff --git a/pkg/common/constant/limit.go b/pkg/common/constant/limit.go index 57e764eef..090ddbe5d 100644 --- a/pkg/common/constant/limit.go +++ b/pkg/common/constant/limit.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package constant const ( diff --git a/pkg/common/db/database/admin.go b/pkg/common/db/database/admin.go index be0dd1389..7139f2dbf 100644 --- a/pkg/common/db/database/admin.go +++ b/pkg/common/db/database/admin.go @@ -1,14 +1,31 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package database import ( "context" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/tx" + "gorm.io/gorm" + "github.com/OpenIMSDK/chat/pkg/common/db/model/admin" table "github.com/OpenIMSDK/chat/pkg/common/db/table/admin" - "gorm.io/gorm" ) type AdminDatabaseInterface interface { + InitAdmin(ctx context.Context) error GetAdmin(ctx context.Context, account string) (*table.Admin, error) GetAdminUserID(ctx context.Context, userID string) (*table.Admin, error) UpdateAdmin(ctx context.Context, userID string, update map[string]any) error @@ -79,6 +96,10 @@ type AdminDatabase struct { clientConfig table.ClientConfigInterface } +func (o *AdminDatabase) InitAdmin(ctx context.Context) error { + return o.admin.InitAdmin(ctx) +} + func (o *AdminDatabase) GetAdmin(ctx context.Context, account string) (*table.Admin, error) { return o.admin.Take(ctx, account) } @@ -182,12 +203,15 @@ func (o *AdminDatabase) SearchDefaultFriend(ctx context.Context, keyword string, func (o *AdminDatabase) FindDefaultGroup(ctx context.Context, groupIDs []string) ([]string, error) { return o.registerAddGroup.FindGroupID(ctx, groupIDs) } + func (o *AdminDatabase) AddDefaultGroup(ctx context.Context, ms []*table.RegisterAddGroup) error { return o.registerAddGroup.Add(ctx, ms) } + func (o *AdminDatabase) DelDefaultGroup(ctx context.Context, groupIDs []string) error { return o.registerAddGroup.Del(ctx, groupIDs) } + func (o *AdminDatabase) SearchDefaultGroup(ctx context.Context, keyword string, page int32, size int32) (uint32, []*table.RegisterAddGroup, error) { return o.registerAddGroup.Search(ctx, keyword, page, size) } @@ -207,6 +231,7 @@ func (o *AdminDatabase) BlockUser(ctx context.Context, f []*table.ForbiddenAccou func (o *AdminDatabase) DelBlockUser(ctx context.Context, userID []string) error { return o.forbiddenAccount.Delete(ctx, userID) } + func (o *AdminDatabase) SearchBlockUser(ctx context.Context, keyword string, page int32, size int32) (uint32, []*table.ForbiddenAccount, error) { return o.forbiddenAccount.Search(ctx, keyword, page, size) } diff --git a/pkg/common/db/database/chat.go b/pkg/common/db/database/chat.go index b211545e5..74e4e375d 100644 --- a/pkg/common/db/database/chat.go +++ b/pkg/common/db/database/chat.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package database import ( @@ -33,6 +47,9 @@ type ChatDatabaseInterface interface { LoginRecord(ctx context.Context, record *table.UserLoginRecord, verifyCodeID *uint) error UpdatePassword(ctx context.Context, userID string, password string) error UpdatePasswordAndDeleteVerifyCode(ctx context.Context, userID string, password string, code uint) error + GetAccountList(ctx context.Context, accountList []string) ([]*table.Attribute, error) + Restriction(ctx context.Context, ip string, isLogin bool) (bool, error) + ExistPhoneNumber(ctx context.Context, areaCode, phoneNumber string) (bool, error) } func NewChatDatabase(db *gorm.DB) ChatDatabaseInterface { @@ -53,6 +70,19 @@ type ChatDatabase struct { attribute table.AttributeInterface userLoginRecord table.UserLoginRecordInterface verifyCode table.VerifyCodeInterface + IPForbidden table.IPForbiddenInterface +} + +func (o *ChatDatabase) ExistPhoneNumber(ctx context.Context, areaCode, phoneNumber string) (bool, error) { + return o.attribute.ExistPhoneNumber(ctx, areaCode, phoneNumber) +} + +func (o *ChatDatabase) Restriction(ctx context.Context, ip string, isLogin bool) (bool, error) { + return o.IPForbidden.Restriction(ctx, ip, isLogin) +} + +func (o *ChatDatabase) GetAccountList(ctx context.Context, accountList []string) ([]*table.Attribute, error) { + return o.attribute.GetAccountList(ctx, accountList) } func (o *ChatDatabase) IsNotFound(err error) bool { diff --git a/pkg/common/db/database/organization.go b/pkg/common/db/database/organization.go new file mode 100644 index 000000000..575a17286 --- /dev/null +++ b/pkg/common/db/database/organization.go @@ -0,0 +1,224 @@ +package database + +import ( + "context" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/tx" + "github.com/OpenIMSDK/chat/pkg/common/db/model/organization" + table "github.com/OpenIMSDK/chat/pkg/common/db/table/organization" + rpc "github.com/OpenIMSDK/chat/pkg/proto/organization" + "gorm.io/gorm" + "time" +) + +type OrganizationDatabaseInterface interface { + //department + GetDepartmentByID(ctx context.Context, departmentID string) (*table.Department, error) + CreateDepartment(ctx context.Context, department *table.Department) error + UpdateDepartment(ctx context.Context, department *table.Department) error + GetParent(ctx context.Context, parentID string) ([]*table.Department, error) + GetDepartment(ctx context.Context, departmentID string) (*table.Department, error) + GetList(ctx context.Context, departmentIDList []string) ([]*table.Department, error) + DeleteDepartment(ctx context.Context, departmentIDList []string) error + UpdateParentID(ctx context.Context, oldParentID, newParentID string) error + GetMaxOrder(ctx context.Context, parentID string) (int32, error) + UpdateOrderIncrement(ctx context.Context, parentID string, startOrder int32) error + UpdateParentIDOrder(ctx context.Context, departmentID, parentID string, order int32) error + GetDepartmentByName(ctx context.Context, name, parentID string) (*table.Department, error) + //departmentMember + FindDepartmentMember(ctx context.Context, departmentIDList []string) ([]*table.DepartmentMember, error) + GetDepartmentMemberByUserID(ctx context.Context, userID string) ([]*table.DepartmentMember, error) + CreateDepartmentMember(ctx context.Context, DepartmentMember *table.DepartmentMember) error + DeleteDepartmentIDList(ctx context.Context, departmentIDList []string) error + DeleteDepartmentMemberByUserID(ctx context.Context, userID string) error + DeleteDepartmentMemberByKey(ctx context.Context, userID string, departmentID string) error + UpdateDepartmentMember(ctx context.Context, DepartmentMember *table.DepartmentMember) error + FindDepartmentMemberByUserID(ctx context.Context, userIDList []string) ([]*table.DepartmentMember, error) + GetUserListInDepartment(ctx context.Context, departmentID string, userIDList []string) ([]*table.DepartmentMember, error) + GetDepartmentMemberByDepartmentID(ctx context.Context, departmentID string) ([]*table.DepartmentMember, error) + CreateDepartmentMemberList(ctx context.Context, members []*table.DepartmentMember) error + GetDepartmentMemberByKey(ctx context.Context, userID, departmentID string) (*table.DepartmentMember, error) + //organizationUser + CreateOrganizationUser(ctx context.Context, OrganizationUser *table.OrganizationUser) error + UpdateOrganizationUser(ctx context.Context, OrganizationUser *table.OrganizationUser) error + DeleteOrganizationUser(ctx context.Context, userID string) error + GetOrganizationUser(ctx context.Context, userID string) (*table.OrganizationUser, error) + SearchPage(ctx context.Context, positionList, userIDList []string, text string, sort []*rpc.GetSearchUserListSort, pageNumber uint32, showNumber uint32) (uint32, []*table.OrganizationUser, error) + GetNoDepartmentUserIDList(ctx context.Context) ([]string, error) + GetOrganizationUserList(ctx context.Context, userIDList []string) ([]*table.OrganizationUser, error) + SearchOrganizationUser(ctx context.Context, positionList, userIDList []string, text string, sort []*rpc.GetSearchUserListSort) ([]*table.OrganizationUser, error) + GetPage(ctx context.Context, pageNumber, showNumber int) (int64, []*table.OrganizationUser, error) + SearchV2(ctx context.Context, keyword string, userIDList []string, pageNumber, showNumber int) (int64, []*table.OrganizationUser, error) + //organizaiton + SetOrganization(ctx context.Context, Organization *table.Organization) error + GetOrganization(ctx context.Context) (*table.Organization, error) + //transaction + BeginTransaction(ctx context.Context) (*gorm.DB, error) +} + +func NewOrganizationDatabase(db *gorm.DB) OrganizationDatabaseInterface { + return &OrganizationDatabase{ + tx: tx.NewGorm(db), + Department: organization.NewDepartment(db), + DepartmentMember: organization.NewDepartmentMember(db), + Organization: organization.NewOrganization(db), + OrganizationUser: organization.NewOrganizationUser(db), + } +} + +type OrganizationDatabase struct { + tx tx.Tx + Department table.DepartmentInterface + DepartmentMember table.DepartmentMemberInterface + OrganizationUser table.OrganizationUserInterface + Organization table.OrganizationInterface +} + +func (o *OrganizationDatabase) SearchV2(ctx context.Context, keyword string, userIDList []string, pageNumber, showNumber int) (int64, []*table.OrganizationUser, error) { + return o.OrganizationUser.SearchV2(ctx, keyword, userIDList, pageNumber, showNumber) +} + +func (o *OrganizationDatabase) GetDepartmentMemberByKey(ctx context.Context, userID, departmentID string) (*table.DepartmentMember, error) { + return o.DepartmentMember.GetByKey(ctx, userID, departmentID) +} + +func (o *OrganizationDatabase) GetDepartmentByName(ctx context.Context, name, parentID string) (*table.Department, error) { + return o.Department.GetByName(ctx, name, parentID) +} + +func (o *OrganizationDatabase) GetPage(ctx context.Context, pageNumber, showNumber int) (int64, []*table.OrganizationUser, error) { + return o.OrganizationUser.GetPage(ctx, pageNumber, showNumber) +} + +func (o *OrganizationDatabase) CreateDepartmentMemberList(ctx context.Context, members []*table.DepartmentMember) error { + return o.DepartmentMember.CreateList(ctx, members) +} + +func (o *OrganizationDatabase) UpdateParentIDOrder(ctx context.Context, departmentID, parentID string, order int32) error { + return o.Department.UpdateParentIDOrder(ctx, departmentID, parentID, order) +} + +func (o *OrganizationDatabase) UpdateOrderIncrement(ctx context.Context, parentID string, startOrder int32) error { + return o.Department.UpdateOrderIncrement(ctx, parentID, startOrder) +} + +func (o *OrganizationDatabase) GetMaxOrder(ctx context.Context, parentID string) (int32, error) { + return o.Department.GetMaxOrder(ctx, parentID) +} + +func (o *OrganizationDatabase) SearchOrganizationUser(ctx context.Context, positionList, userIDList []string, text string, sort []*rpc.GetSearchUserListSort) ([]*table.OrganizationUser, error) { + return o.OrganizationUser.Search(ctx, positionList, userIDList, text, sort) +} + +func (o *OrganizationDatabase) GetDepartmentMemberByDepartmentID(ctx context.Context, departmentID string) ([]*table.DepartmentMember, error) { + return o.DepartmentMember.GetByDepartmentID(ctx, departmentID) +} + +func (o *OrganizationDatabase) GetUserListInDepartment(ctx context.Context, departmentID string, userIDList []string) ([]*table.DepartmentMember, error) { + return o.DepartmentMember.GetUserListInDepartment(ctx, departmentID, userIDList) +} + +func (o *OrganizationDatabase) GetOrganizationUserList(ctx context.Context, userIDList []string) ([]*table.OrganizationUser, error) { + return o.OrganizationUser.GetList(ctx, userIDList) +} + +func (o *OrganizationDatabase) GetNoDepartmentUserIDList(ctx context.Context) ([]string, error) { + return o.OrganizationUser.GetNoDepartmentUserIDList(ctx) +} + +func (o *OrganizationDatabase) GetOrganization(ctx context.Context) (*table.Organization, error) { + return o.Organization.Get(ctx) +} + +func (o *OrganizationDatabase) SetOrganization(ctx context.Context, Organization *table.Organization) error { + return o.Organization.Set(ctx, Organization) +} + +func (o *OrganizationDatabase) FindDepartmentMemberByUserID(ctx context.Context, userIDList []string) ([]*table.DepartmentMember, error) { + return o.DepartmentMember.FindByUserID(ctx, userIDList) +} + +func (o *OrganizationDatabase) SearchPage(ctx context.Context, positionList, userIDList []string, text string, sort []*rpc.GetSearchUserListSort, pageNumber uint32, showNumber uint32) (uint32, []*table.OrganizationUser, error) { + return o.OrganizationUser.SearchPage(ctx, positionList, userIDList, text, sort, pageNumber, showNumber) +} + +func (o *OrganizationDatabase) GetDepartmentMemberByUserID(ctx context.Context, userID string) ([]*table.DepartmentMember, error) { + return o.DepartmentMember.Get(ctx, userID) +} + +func (o *OrganizationDatabase) CreateDepartmentMember(ctx context.Context, DepartmentMember *table.DepartmentMember) error { + return o.DepartmentMember.Create(ctx, DepartmentMember) +} + +func (o *OrganizationDatabase) DeleteDepartmentMemberByUserID(ctx context.Context, userID string) error { + return o.DepartmentMember.DeleteByUserID(ctx, userID) +} + +func (o *OrganizationDatabase) DeleteDepartmentMemberByKey(ctx context.Context, userID string, departmentID string) error { + return o.DepartmentMember.DeleteByKey(ctx, userID, departmentID) +} + +func (o *OrganizationDatabase) UpdateDepartmentMember(ctx context.Context, DepartmentMember *table.DepartmentMember) error { + return o.DepartmentMember.Update(ctx, DepartmentMember) +} + +func (o *OrganizationDatabase) GetOrganizationUser(ctx context.Context, userID string) (*table.OrganizationUser, error) { + return o.OrganizationUser.Get(ctx, userID) +} + +func (o *OrganizationDatabase) DeleteOrganizationUser(ctx context.Context, userID string) error { + return o.OrganizationUser.Delete(ctx, userID) +} + +func (o *OrganizationDatabase) UpdateOrganizationUser(ctx context.Context, OrganizationUser *table.OrganizationUser) error { + return o.OrganizationUser.Update(ctx, OrganizationUser) +} + +func (o *OrganizationDatabase) CreateOrganizationUser(ctx context.Context, OrganizationUser *table.OrganizationUser) error { + return o.OrganizationUser.Create(ctx, OrganizationUser) +} + +func (o *OrganizationDatabase) DeleteDepartmentIDList(ctx context.Context, departmentIDList []string) error { + return o.DepartmentMember.DeleteDepartmentIDList(ctx, departmentIDList) +} + +func (o *OrganizationDatabase) DeleteDepartment(ctx context.Context, departmentIDList []string) error { + return o.Department.Delete(ctx, departmentIDList) +} + +func (o *OrganizationDatabase) UpdateParentID(ctx context.Context, oldParentID, newParentID string) error { + return o.Department.UpdateParentID(ctx, oldParentID, newParentID) +} + +func (o *OrganizationDatabase) GetList(ctx context.Context, departmentIDList []string) ([]*table.Department, error) { + return o.Department.GetList(ctx, departmentIDList) +} + +func (o *OrganizationDatabase) FindDepartmentMember(ctx context.Context, departmentIDList []string) ([]*table.DepartmentMember, error) { + return o.DepartmentMember.FindByDepartmentID(ctx, departmentIDList) +} + +func (o *OrganizationDatabase) GetParent(ctx context.Context, parentID string) ([]*table.Department, error) { + return o.Department.GetParent(ctx, parentID) +} + +func (o *OrganizationDatabase) UpdateDepartment(ctx context.Context, department *table.Department) error { + return o.Department.Update(ctx, department) +} + +func (o *OrganizationDatabase) GetDepartmentByID(ctx context.Context, departmentID string) (*table.Department, error) { + return o.Department.FindOne(ctx, departmentID) +} + +func (o *OrganizationDatabase) CreateDepartment(ctx context.Context, department *table.Department) error { + department.CreateTime = time.Now() + department.ChangeTime = time.Now() + return o.Department.Create(ctx, department) +} + +func (o *OrganizationDatabase) GetDepartment(ctx context.Context, departmentID string) (*table.Department, error) { + return o.Department.GetDepartment(ctx, departmentID) +} + +func (o *OrganizationDatabase) BeginTransaction(ctx context.Context) (*gorm.DB, error) { + return o.Organization.BeginTransaction(ctx) +} diff --git a/pkg/common/db/dbutil/gorm.go b/pkg/common/db/dbutil/gorm.go index 68b751b11..64a36f1a7 100644 --- a/pkg/common/db/dbutil/gorm.go +++ b/pkg/common/db/dbutil/gorm.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package dbutil import ( diff --git a/pkg/common/db/model/admin/admin.go b/pkg/common/db/model/admin/admin.go index d77014519..11f83d223 100644 --- a/pkg/common/db/model/admin/admin.go +++ b/pkg/common/db/model/admin/admin.go @@ -1,10 +1,28 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package admin import ( "context" + "crypto/md5" + "encoding/hex" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" "github.com/OpenIMSDK/chat/pkg/common/db/table/admin" "gorm.io/gorm" + "time" ) func NewAdmin(db *gorm.DB) *Admin { @@ -30,3 +48,35 @@ func (o *Admin) TakeUserID(ctx context.Context, userID string) (*admin.Admin, er func (o *Admin) Update(ctx context.Context, account string, update map[string]any) error { return errs.Wrap(o.db.WithContext(ctx).Model(&admin.Admin{}).Where("user_id = ?", account).Updates(update).Error) } + +func (o *Admin) InitAdmin(ctx context.Context) error { + var count int64 + if err := o.db.WithContext(ctx).Model(&admin.Admin{}).Count(&count).Error; err != nil { + return errs.Wrap(err) + } + if count > 0 || len(config.Config.Manager.UserID) == 0 { + return nil + } + now := time.Now() + admins := make([]*admin.Admin, 0, len(config.Config.Manager.UserID)) + for i, userID := range config.Config.Manager.UserID { + password := md5.Sum([]byte(userID)) + table := admin.Admin{ + Account: userID, + UserID: userID, + Password: hex.EncodeToString(password[:]), + Level: 100, + CreateTime: now, + } + if len(config.Config.Manager.Nickname) > i { + table.Nickname = config.Config.Manager.Nickname[i] + } else { + table.Nickname = userID + } + admins = append(admins, &table) + } + if err := o.db.WithContext(ctx).Create(&admins).Error; err != nil { + return errs.Wrap(err) + } + return nil +} diff --git a/pkg/common/db/model/admin/applet.go b/pkg/common/db/model/admin/applet.go index 96cdb5030..443ec571b 100644 --- a/pkg/common/db/model/admin/applet.go +++ b/pkg/common/db/model/admin/applet.go @@ -1,12 +1,28 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package admin import ( "context" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/ormutil" "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" + "gorm.io/gorm" + "github.com/OpenIMSDK/chat/pkg/common/constant" "github.com/OpenIMSDK/chat/pkg/common/db/table/admin" - "gorm.io/gorm" ) func NewApplet(db *gorm.DB) *Applet { diff --git a/pkg/common/db/model/admin/client_config.go b/pkg/common/db/model/admin/client_config.go index 6a5feaf06..58539f9ef 100644 --- a/pkg/common/db/model/admin/client_config.go +++ b/pkg/common/db/model/admin/client_config.go @@ -1,10 +1,26 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package admin import ( "context" + "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" - "github.com/OpenIMSDK/chat/pkg/common/db/table/admin" "gorm.io/gorm" + + "github.com/OpenIMSDK/chat/pkg/common/db/table/admin" ) func NewClientConfig(db *gorm.DB) admin.ClientConfigInterface { diff --git a/pkg/common/db/model/admin/forbidden_account.go b/pkg/common/db/model/admin/forbidden_account.go index f72d6e28a..1544e01e0 100644 --- a/pkg/common/db/model/admin/forbidden_account.go +++ b/pkg/common/db/model/admin/forbidden_account.go @@ -1,11 +1,27 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package admin import ( "context" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/ormutil" "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" - "github.com/OpenIMSDK/chat/pkg/common/db/table/admin" "gorm.io/gorm" + + "github.com/OpenIMSDK/chat/pkg/common/db/table/admin" ) func NewForbiddenAccount(db *gorm.DB) admin.ForbiddenAccountInterface { diff --git a/pkg/common/db/model/admin/invitation_register.go b/pkg/common/db/model/admin/invitation_register.go index 326b8d5c9..9980530ee 100644 --- a/pkg/common/db/model/admin/invitation_register.go +++ b/pkg/common/db/model/admin/invitation_register.go @@ -1,12 +1,28 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package admin import ( "context" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/ormutil" "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" + "gorm.io/gorm" + "github.com/OpenIMSDK/chat/pkg/common/constant" "github.com/OpenIMSDK/chat/pkg/common/db/table/admin" - "gorm.io/gorm" ) func NewInvitationRegister(db *gorm.DB) admin.InvitationRegisterInterface { diff --git a/pkg/common/db/model/admin/ip_forbidden.go b/pkg/common/db/model/admin/ip_forbidden.go index 3538bb089..8e54e70dc 100644 --- a/pkg/common/db/model/admin/ip_forbidden.go +++ b/pkg/common/db/model/admin/ip_forbidden.go @@ -1,12 +1,28 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package admin import ( "context" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/ormutil" "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" + "gorm.io/gorm" + "github.com/OpenIMSDK/chat/pkg/common/constant" "github.com/OpenIMSDK/chat/pkg/common/db/table/admin" - "gorm.io/gorm" ) func NewIPForbidden(db *gorm.DB) admin.IPForbiddenInterface { diff --git a/pkg/common/db/model/admin/limit_user_login_ip.go b/pkg/common/db/model/admin/limit_user_login_ip.go index 0354e4754..e87a5aefb 100644 --- a/pkg/common/db/model/admin/limit_user_login_ip.go +++ b/pkg/common/db/model/admin/limit_user_login_ip.go @@ -1,11 +1,27 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package admin import ( "context" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/ormutil" "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" - "github.com/OpenIMSDK/chat/pkg/common/db/table/admin" "gorm.io/gorm" + + "github.com/OpenIMSDK/chat/pkg/common/db/table/admin" ) func NewLimitUserLoginIP(db *gorm.DB) admin.LimitUserLoginIPInterface { diff --git a/pkg/common/db/model/admin/register_add_friend.go b/pkg/common/db/model/admin/register_add_friend.go index ad851d87e..3709d60d4 100644 --- a/pkg/common/db/model/admin/register_add_friend.go +++ b/pkg/common/db/model/admin/register_add_friend.go @@ -1,11 +1,27 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package admin import ( "context" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/ormutil" "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" - "github.com/OpenIMSDK/chat/pkg/common/db/table/admin" "gorm.io/gorm" + + "github.com/OpenIMSDK/chat/pkg/common/db/table/admin" ) func NewRegisterAddFriend(db *gorm.DB) admin.RegisterAddFriendInterface { diff --git a/pkg/common/db/model/admin/register_add_group.go b/pkg/common/db/model/admin/register_add_group.go index fe0ac8146..9ac6029ee 100644 --- a/pkg/common/db/model/admin/register_add_group.go +++ b/pkg/common/db/model/admin/register_add_group.go @@ -1,11 +1,27 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package admin import ( "context" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/ormutil" "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" - "github.com/OpenIMSDK/chat/pkg/common/db/table/admin" "gorm.io/gorm" + + "github.com/OpenIMSDK/chat/pkg/common/db/table/admin" ) func NewRegisterAddGroup(db *gorm.DB) admin.RegisterAddGroupInterface { diff --git a/pkg/common/db/model/chat/account.go b/pkg/common/db/model/chat/account.go index 55ec1bef6..cbcf6f365 100644 --- a/pkg/common/db/model/chat/account.go +++ b/pkg/common/db/model/chat/account.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package chat import ( diff --git a/pkg/common/db/model/chat/attribute.go b/pkg/common/db/model/chat/attribute.go index 3952daab1..1e5a483bf 100644 --- a/pkg/common/db/model/chat/attribute.go +++ b/pkg/common/db/model/chat/attribute.go @@ -2,8 +2,10 @@ package chat import ( "context" + "errors" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/ormutil" "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" + "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" "github.com/OpenIMSDK/chat/pkg/common/db/table/chat" "gorm.io/gorm" ) @@ -60,3 +62,24 @@ func (o *Attribute) Take(ctx context.Context, userID string) (*chat.Attribute, e var a chat.Attribute return &a, errs.Wrap(o.db.WithContext(ctx).Where("user_id = ?", userID).Take(&a).Error) } + +func (tb *Attribute) GetAccountList(ctx context.Context, accountList []string) ([]*chat.Attribute, error) { + if len(accountList) == 0 { + return []*chat.Attribute{}, nil + } + var att []*chat.Attribute + err := tb.db.WithContext(ctx).Model(&att).Where("account in (?)", accountList).Find(&att).Error + return att, utils.Wrap(err, "") +} + +func (tb *Attribute) ExistPhoneNumber(ctx context.Context, areaCode, phoneNumber string) (bool, error) { + var m chat.Attribute + err := tb.db.WithContext(ctx).Model(&chat.Attribute{}).Where("area_code = ? and phone_number = ?", areaCode, phoneNumber).First(&m).Error + if err == nil { + return true, nil + } else if errors.Is(err, gorm.ErrRecordNotFound) { + return false, nil + } else { + return false, utils.Wrap(err, "") + } +} diff --git a/pkg/common/db/model/chat/ip_forbidden.go b/pkg/common/db/model/chat/ip_forbidden.go new file mode 100644 index 000000000..c10cefc99 --- /dev/null +++ b/pkg/common/db/model/chat/ip_forbidden.go @@ -0,0 +1,31 @@ +package chat + +import ( + "context" + "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + "github.com/OpenIMSDK/chat/pkg/common/db/table/admin" + "gorm.io/gorm" +) + +func NewIPForbidden(db *gorm.DB) *IPForbidden { + return &IPForbidden{db: db} +} + +type IPForbidden struct { + db *gorm.DB +} + +func (tb *IPForbidden) Restriction(ctx context.Context, ip string, isLogin bool) (bool, error) { + var m admin.IPForbidden + switch err := tb.db.WithContext(ctx).Model(&m).Where("ip = ?", ip).First(&m).Error; err { + case nil: + if isLogin { + return m.LimitLogin == true, nil + } + return m.LimitRegister == true, nil + case gorm.ErrRecordNotFound: + return false, nil + default: + return false, utils.Wrap(err, "") + } +} diff --git a/pkg/common/db/model/chat/register.go b/pkg/common/db/model/chat/register.go index 22e80b1c5..665c5918b 100644 --- a/pkg/common/db/model/chat/register.go +++ b/pkg/common/db/model/chat/register.go @@ -1,10 +1,26 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package chat import ( "context" + "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" - "github.com/OpenIMSDK/chat/pkg/common/db/table/chat" "gorm.io/gorm" + + "github.com/OpenIMSDK/chat/pkg/common/db/table/chat" ) func NewRegister(db *gorm.DB) chat.RegisterInterface { diff --git a/pkg/common/db/model/chat/user_login_record.go b/pkg/common/db/model/chat/user_login_record.go index 5755fe8f2..a040bf377 100644 --- a/pkg/common/db/model/chat/user_login_record.go +++ b/pkg/common/db/model/chat/user_login_record.go @@ -1,9 +1,26 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package chat import ( "context" - "github.com/OpenIMSDK/chat/pkg/common/db/table/chat" + + "gorm.io/gorm" + + "github.com/OpenIMSDK/chat/pkg/common/db/table/chat" ) func NewUserLoginRecord(db *gorm.DB) chat.UserLoginRecordInterface { diff --git a/pkg/common/db/model/chat/verify_code.go b/pkg/common/db/model/chat/verify_code.go index f702e0fd0..6175c11ff 100644 --- a/pkg/common/db/model/chat/verify_code.go +++ b/pkg/common/db/model/chat/verify_code.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package chat import ( diff --git a/pkg/common/db/model/organization/department.go b/pkg/common/db/model/organization/department.go new file mode 100644 index 000000000..e5e972c63 --- /dev/null +++ b/pkg/common/db/model/organization/department.go @@ -0,0 +1,84 @@ +package organization + +import ( + "context" + "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" + "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + table "github.com/OpenIMSDK/chat/pkg/common/db/table/organization" + "gorm.io/gorm" + "time" +) + +func NewDepartment(db *gorm.DB) *Department { + return &Department{ + db: db, + } +} + +type Department struct { + db *gorm.DB +} + +func (d *Department) GetParent(ctx context.Context, parentID string) ([]*table.Department, error) { + var ms []*table.Department + return ms, utils.Wrap(d.db.WithContext(ctx).Where("parent_id = ?", parentID).Order("`order` ASC, `create_time` ASC").Find(ms).Error, "") +} + +func (d *Department) Update(ctx context.Context, department *table.Department) error { + department.ChangeTime = time.Now() + return utils.Wrap(d.db.WithContext(ctx).Updates(department).Error, "") +} + +func (d *Department) Create(ctx context.Context, departments ...*table.Department) error { + return errs.Wrap(d.db.WithContext(ctx).Create(departments).Error) +} + +func (d *Department) FindOne(ctx context.Context, departmentID string) (*table.Department, error) { + var m table.Department + return &m, utils.Wrap(d.db.WithContext(ctx).Where("department_id = ?", departmentID).First(&m).Error, "") +} + +func (o *Department) GetList(ctx context.Context, departmentIdList []string) ([]*table.Department, error) { + if len(departmentIdList) == 0 { + return []*table.Department{}, nil + } + var ms []*table.Department + return ms, utils.Wrap(o.db.WithContext(ctx).Where("department_id in (?)", departmentIdList).Order("`order` ASC, `create_time` ASC").Find(&ms).Error, "") +} + +func (o *Department) UpdateParentID(ctx context.Context, oldParentID, newParentID string) error { + return utils.Wrap(o.db.WithContext(ctx).Model(&table.Department{}).Where("parent_id = ?", oldParentID).Update("parent_id", newParentID).Error, "") +} + +func (o *Department) Delete(ctx context.Context, departmentIDList []string) error { + if len(departmentIDList) == 0 { + return nil + } + return utils.Wrap(o.db.WithContext(ctx).Where("department_id in (?)", departmentIDList).Delete(&table.Department{}).Error, "") +} + +func (o *Department) GetDepartment(ctx context.Context, departmentId string) (*table.Department, error) { + var m table.Department + return &m, utils.Wrap(o.db.WithContext(ctx).Where("department_id = ?", departmentId).First(&m).Error, "") +} + +func (o *Department) GetMaxOrder(ctx context.Context, parentID string) (int32, error) { + // SELECT IFNULL(MAX(`order`), 0) FROM department_members WHERE `user_id` = "22286361621" + var order int32 + return order, utils.Wrap(o.db.WithContext(ctx).Model(&table.Department{}).Select("IFNULL(MAX(`order`), 0)").Where("parent_id = ?", parentID).Scan(&order).Error, "") +} + +func (o *Department) UpdateOrderIncrement(ctx context.Context, parentID string, startOrder int32) error { + return utils.Wrap(o.db.WithContext(ctx).Model(&table.Department{}).Where("parent_id = ? AND `order` >= ?", parentID, startOrder).Update("`order`", gorm.Expr("`order` + ?", 1)).Error, "") +} +func (o *Department) UpdateParentIDOrder(ctx context.Context, departmentID, parentID string, order int32) error { + return utils.Wrap(o.db.WithContext(ctx).Model(&table.Department{}).Where("department_id = ?", departmentID).Updates(map[string]interface{}{ + "parent_id": parentID, + "`order`": order, + }).Error, "") +} + +func (o *Department) GetByName(ctx context.Context, name, parentID string) (*table.Department, error) { + var m table.Department + return &m, utils.Wrap(o.db.WithContext(ctx).Where("name = ? AND parent_id = ?", name, parentID).First(&m).Error, "") +} diff --git a/pkg/common/db/model/organization/departmentMember.go b/pkg/common/db/model/organization/departmentMember.go new file mode 100644 index 000000000..6dba96a51 --- /dev/null +++ b/pkg/common/db/model/organization/departmentMember.go @@ -0,0 +1,90 @@ +package organization + +import ( + "context" + "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + table "github.com/OpenIMSDK/chat/pkg/common/db/table/organization" + "gorm.io/gorm" + "time" +) + +func NewDepartmentMember(db *gorm.DB) *DepartmentMember { + return &DepartmentMember{ + db: db, + } +} + +type DepartmentMember struct { + db *gorm.DB +} + +func (o *DepartmentMember) FindByDepartmentID(ctx context.Context, departmentIDList []string) ([]*table.DepartmentMember, error) { + if len(departmentIDList) == 0 { + return []*table.DepartmentMember{}, nil + } + var ms []*table.DepartmentMember + return ms, utils.Wrap(o.db.WithContext(ctx).Where("department_id in (?)", departmentIDList).Find(ms).Error, "") +} + +func (o *DepartmentMember) DeleteDepartmentIDList(ctx context.Context, departmentIDList []string) error { + return utils.Wrap(o.db.WithContext(ctx).Where("department_id in (?)", departmentIDList).Delete(&table.DepartmentMember{}).Error, "") +} + +func (o *DepartmentMember) DeleteByUserID(ctx context.Context, userID string) error { + return utils.Wrap(o.db.WithContext(ctx).Where("user_id = ? ", userID).Delete(&table.DepartmentMember{}).Error, "") +} + +func (o *DepartmentMember) Create(ctx context.Context, m *table.DepartmentMember) error { + m.CreateTime = time.Now() + m.ChangeTime = time.Now() + return utils.Wrap(o.db.WithContext(ctx).Create(m).Error, "") +} + +func (o *DepartmentMember) Get(ctx context.Context, userID string) ([]*table.DepartmentMember, error) { + var ms []*table.DepartmentMember + return ms, utils.Wrap(o.db.WithContext(ctx).Where("user_id = ?", userID).Find(ms).Error, "") +} + +func (o *DepartmentMember) DeleteByKey(ctx context.Context, userID, departmentID string) error { + return utils.Wrap(o.db.WithContext(ctx).Where("user_id = ? AND department_id = ?", userID, departmentID).Delete(&table.DepartmentMember{}).Error, "") +} + +func (o *DepartmentMember) Update(ctx context.Context, m *table.DepartmentMember) error { + m.ChangeTime = time.Now() + return utils.Wrap(o.db.WithContext(ctx).Where("user_id = ? AND department_id = ?", m.UserID, m.DepartmentID).Updates(m).Error, "") +} + +func (o *DepartmentMember) FindByUserID(ctx context.Context, userIDList []string) ([]*table.DepartmentMember, error) { + if len(userIDList) == 0 { + return []*table.DepartmentMember{}, nil + } + var ms []*table.DepartmentMember + return ms, utils.Wrap(o.db.WithContext(ctx).Where("user_id in (?)", userIDList).Find(ms).Error, "") +} + +func (o *DepartmentMember) GetUserListInDepartment(ctx context.Context, departmentID string, userIDList []string) ([]*table.DepartmentMember, error) { + if len(userIDList) == 0 { + return []*table.DepartmentMember{}, nil + } + var ms []*table.DepartmentMember + return ms, utils.Wrap(o.db.WithContext(ctx).Where("department_id = ? AND user_id in (?)", departmentID, userIDList).Find(&ms).Error, "") +} + +func (o *DepartmentMember) GetByDepartmentID(ctx context.Context, departmentID string) ([]*table.DepartmentMember, error) { + var ms []*table.DepartmentMember + return ms, utils.Wrap(o.db.WithContext(ctx).Where("department_id = ?", departmentID).Find(ms).Error, "") +} + +func (o *DepartmentMember) CreateList(ctx context.Context, ms []*table.DepartmentMember) error { + now := time.Now() + for i := 0; i < len(ms); i++ { + ms[i].CreateTime = now + ms[i].ChangeTime = now + } + return utils.Wrap(o.db.WithContext(ctx).Create(&ms).Error, "") +} + +func (o *DepartmentMember) GetByKey(ctx context.Context, userID, departmentID string) (*table.DepartmentMember, error) { + var ms *table.DepartmentMember + return ms, utils.Wrap(o.db.WithContext(ctx).Where("user_id = ? and department_id = ?", userID, departmentID).First(ms).Error, "") +} diff --git a/pkg/common/db/model/organization/organization.go b/pkg/common/db/model/organization/organization.go new file mode 100644 index 000000000..faea5986d --- /dev/null +++ b/pkg/common/db/model/organization/organization.go @@ -0,0 +1,48 @@ +package organization + +import ( + "context" + "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + table "github.com/OpenIMSDK/chat/pkg/common/db/table/organization" + "gorm.io/gorm" + "time" +) + +func NewOrganization(db *gorm.DB) *Organization { + return &Organization{ + db: db, + } +} + +type Organization struct { + db *gorm.DB +} + +func (o *Organization) Set(ctx context.Context, m *table.Organization) error { + var org table.Organization + if err := o.db.WithContext(ctx).First(&org).Error; err == nil { + m.CreateTime = time.Time{} + m.ChangeTime = time.Now() + return utils.Wrap(o.db.WithContext(ctx).Where("1 = 1").Updates(m).Error, "") + } else if err == gorm.ErrRecordNotFound { + m.CreateTime = time.Now() + m.ChangeTime = time.Now() + return utils.Wrap(o.db.WithContext(ctx).Create(m).Error, "") + } else { + return utils.Wrap(err, "") + } +} + +func (o *Organization) Get(ctx context.Context) (*table.Organization, error) { + var m table.Organization + if err := o.db.WithContext(ctx).First(&m).Error; err == gorm.ErrRecordNotFound { + m.CreateTime = time.UnixMilli(0) + } else if err != nil { + return nil, utils.Wrap(err, "") + } + return &m, nil +} + +func (o *Organization) BeginTransaction(ctx context.Context) (*gorm.DB, error) { + return o.db.WithContext(ctx).Begin(), nil +} diff --git a/pkg/common/db/model/organization/organizationUser.go b/pkg/common/db/model/organization/organizationUser.go new file mode 100644 index 000000000..7d0ad401b --- /dev/null +++ b/pkg/common/db/model/organization/organizationUser.go @@ -0,0 +1,174 @@ +package organization + +import ( + "context" + "fmt" + "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + table "github.com/OpenIMSDK/chat/pkg/common/db/table/organization" + "github.com/OpenIMSDK/chat/pkg/proto/organization" + "gorm.io/gorm" + "strings" + "time" +) + +func NewOrganizationUser(db *gorm.DB) *OrganizationUser { + return &OrganizationUser{ + db: db, + } +} + +type OrganizationUser struct { + db *gorm.DB +} + +func (tb *OrganizationUser) Create(ctx context.Context, m *table.OrganizationUser) error { + m.CreateTime = time.Now() + m.ChangeTime = time.Now() + return utils.Wrap(tb.db.WithContext(ctx).Create(m).Error, "") +} + +func (tb *OrganizationUser) Update(ctx context.Context, m *table.OrganizationUser) error { + m.ChangeTime = time.Now() + return utils.Wrap(tb.db.WithContext(ctx).Where("user_id = ?", m.UserID).Updates(&m).Error, "") +} + +func (tb *OrganizationUser) Delete(ctx context.Context, userID string) error { + return utils.Wrap(tb.db.WithContext(ctx).Where("user_id = ?", userID).Delete(&table.OrganizationUser{}).Error, "") +} + +func (tb *OrganizationUser) Get(ctx context.Context, userID string) (*table.OrganizationUser, error) { + var m table.OrganizationUser + return &m, utils.Wrap(tb.db.WithContext(ctx).Where("user_id = ?", userID).First(&m).Error, "") +} + +func (tb *OrganizationUser) SearchPage(ctx context.Context, positionList, userIDList []string, text string, sort []*organization.GetSearchUserListSort, pageNumber uint32, showNumber uint32) (uint32, []*table.OrganizationUser, error) { + db := tb.db + if len(positionList) > 0 { + db = db.Where("position in (?)", positionList) + } + if len(userIDList) > 0 { + db = db.Where("user_id in (?)", userIDList) + } + if text != "" { + fields := []string{"user_id", "nickname", "english_name", "mobile", "telephone", "email"} + //values := make([]interface{}, len(fields)) + for i := 0; i < len(fields); i++ { + fields[i] = fmt.Sprintf("`%s` like '%%%s%%'", fields[i], text) + //values[i] = text + } + db = db.Where(strings.Join(fields, " OR ")) + //db = db.Where(strings.Join(fields, " OR "), values...) + } else { + db = db.Where("1=1") + } + var count int64 + if err := db.Model(&table.OrganizationUser{}).Count(&count).Error; err != nil { + return 0, nil, utils.Wrap(err, "") + } + if showNumber > 0 { + db = db.Offset(int(pageNumber * showNumber)).Limit(int(showNumber)) + } + if len(sort) > 0 { // DESC: 降序 ASC: 升序 + arr := make([]string, len(sort)) + for i, s := range sort { + if s.Rule == "" { + arr[i] = fmt.Sprintf("`%s`", s.Field) + } else { + arr[i] = fmt.Sprintf("`%s` %s", s.Field, s.Rule) + } + } + db = db.Order(strings.Join(arr, ",")) + } + db = db.Order("`order` ASC, `create_time` ASC") + var ms []*table.OrganizationUser + return uint32(count), ms, utils.Wrap(db.Find(ms).Error, "") +} + +func (tb *OrganizationUser) GetNoDepartmentUserIDList(ctx context.Context) ([]string, error) { + type Temp struct { + UserID string + } + var ts []Temp + err := tb.db.WithContext(ctx).Raw("SELECT ou.user_id,dm.user_id AS dm_user_id,dm.department_id AS dm_department_id FROM organization_users ou LEFT JOIN department_members dm ON dm.user_id=ou.user_id HAVING dm_user_id IS NULL OR dm_department_id=''").Scan(&ts).Error + if err != nil { + return nil, utils.Wrap(err, "") + } + + userIDList := make([]string, len(ts)) + for i, t := range ts { + userIDList[i] = t.UserID + } + return userIDList, nil +} + +func (tb *OrganizationUser) GetList(ctx context.Context, userIDList []string) ([]*table.OrganizationUser, error) { + if len(userIDList) == 0 { + return []*table.OrganizationUser{}, nil + } + var ms []*table.OrganizationUser + return ms, utils.Wrap(tb.db.Where("user_id in (?)", userIDList).Find(ms).Error, "") +} + +func (tb *OrganizationUser) Search(ctx context.Context, positionList, userIDList []string, text string, sort []*organization.GetSearchUserListSort) ([]*table.OrganizationUser, error) { + db := tb.db + if len(positionList) > 0 { + db = db.WithContext(ctx).Where("position in (?)", positionList) + } + if len(userIDList) > 0 { + db = db.WithContext(ctx).Where("user_id in (?)", userIDList) + } + if text != "" { + fields := []string{"user_id", "nickname", "english_name", "mobile", "telephone", "email"} + //values := make([]interface{}, len(fields)) + for i := 0; i < len(fields); i++ { + fields[i] = fmt.Sprintf("`%s` like '%%%s%%'", fields[i], text) + //values[i] = text + } + db = db.WithContext(ctx).Where(strings.Join(fields, " OR ")) + //db = db.Where(strings.Join(fields, " OR "), values...) + } else { + db = db.WithContext(ctx).Where("1=1") + } + + if len(sort) > 0 { // DESC: 降序 ASC: 升序 + arr := make([]string, len(sort)) + for i, s := range sort { + if s.Rule == "" { + arr[i] = fmt.Sprintf("`%s`", s.Field) + } else { + arr[i] = fmt.Sprintf("`%s` %s", s.Field, s.Rule) + } + } + db = db.WithContext(ctx).Order(strings.Join(arr, ",")) + } + db = db.WithContext(ctx).Order("`order` ASC, `create_time` ASC") + var ms []*table.OrganizationUser + return ms, utils.Wrap(db.Find(ms).Error, "") +} + +func (tb *OrganizationUser) GetPage(ctx context.Context, pageNumber, showNumber int) (int64, []*table.OrganizationUser, error) { + var total int64 + err := tb.db.Model(&table.OrganizationUser{}).Count(&total).Error + if err != nil { + return 0, nil, utils.Wrap(err, "") + } + + var users []*table.OrganizationUser + err = tb.db.WithContext(ctx).Model(&table.OrganizationUser{}).Order("create_time DESC").Offset(pageNumber * showNumber).Limit(showNumber).Find(users).Error + return total, users, utils.Wrap(err, "") +} + +func (tb *OrganizationUser) SearchV2(ctx context.Context, keyword string, orUserIDList []string, pageNumber, showNumber int) (int64, []*table.OrganizationUser, error) { + db := tb.db.Model(&table.OrganizationUser{}) + if keyword != "" { + vague := "%" + keyword + "%" + db = db.WithContext(ctx).Where("user_id in (?) OR mobile = ? OR telephone = ? OR email = ? OR nickname like ? OR english_name like ?", append(orUserIDList, keyword), keyword, keyword, keyword, vague, vague) + } + var count int64 + if err := db.WithContext(ctx).Count(&count).Error; err != nil { + return 0, nil, utils.Wrap(err, "") + } + db = db.WithContext(ctx).Order("`order` ASC, `create_time` ASC").Offset(int(pageNumber) * int(showNumber)).Limit(int(showNumber)) + var ms []*table.OrganizationUser + return count, ms, utils.Wrap(db.WithContext(ctx).Find(&ms).Error, "") +} diff --git a/pkg/common/db/table/admin/admin.go b/pkg/common/db/table/admin/admin.go index 26ed3bc13..f915174e7 100644 --- a/pkg/common/db/table/admin/admin.go +++ b/pkg/common/db/table/admin/admin.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package admin import ( @@ -5,13 +19,13 @@ import ( "time" ) -// Admin 后台管理员 +// Admin 后台管理员. type Admin struct { Account string `gorm:"column:account;primary_key;type:char(64)"` Password string `gorm:"column:password;type:char(64)"` FaceURL string `gorm:"column:face_url;type:char(64)"` Nickname string `gorm:"column:nickname;type:char(64)"` - UserID string `gorm:"column:user_id;type:char(64)"` //openIM userID + UserID string `gorm:"column:user_id;type:char(64)"` // openIM userID Level int32 `gorm:"column:level;default:1" ` CreateTime time.Time `gorm:"column:create_time"` } @@ -24,4 +38,5 @@ type AdminInterface interface { Take(ctx context.Context, account string) (*Admin, error) TakeUserID(ctx context.Context, userID string) (*Admin, error) Update(ctx context.Context, account string, update map[string]any) error + InitAdmin(ctx context.Context) error } diff --git a/pkg/common/db/table/admin/applet.go b/pkg/common/db/table/admin/applet.go index 35ad8e148..3bd3c0293 100644 --- a/pkg/common/db/table/admin/applet.go +++ b/pkg/common/db/table/admin/applet.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package admin import ( diff --git a/pkg/common/db/table/admin/client_config.go b/pkg/common/db/table/admin/client_config.go index 2d7ae5c94..7678f6093 100644 --- a/pkg/common/db/table/admin/client_config.go +++ b/pkg/common/db/table/admin/client_config.go @@ -1,8 +1,22 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package admin import "context" -// ClientConfig 客户端相关配置项 +// ClientConfig 客户端相关配置项. type ClientConfig struct { Key string `gorm:"column:key;primary_key;type:varchar(255)"` Value string `gorm:"column:value;not null;type:text"` diff --git a/pkg/common/db/table/admin/forbidden_account.go b/pkg/common/db/table/admin/forbidden_account.go index 779b82135..f5a55d740 100644 --- a/pkg/common/db/table/admin/forbidden_account.go +++ b/pkg/common/db/table/admin/forbidden_account.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package admin import ( @@ -5,7 +19,7 @@ import ( "time" ) -// ForbiddenAccount 封号表 +// ForbiddenAccount 封号表. type ForbiddenAccount struct { UserID string `gorm:"column:user_id;index:userID;primary_key;type:char(64)"` Reason string `gorm:"column:reason;type:varchar(255)" ` diff --git a/pkg/common/db/table/admin/invitation_register.go b/pkg/common/db/table/admin/invitation_register.go index 2120d00b5..8ac4f6a05 100644 --- a/pkg/common/db/table/admin/invitation_register.go +++ b/pkg/common/db/table/admin/invitation_register.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package admin import ( @@ -5,7 +19,7 @@ import ( "time" ) -// 邀请码被注册使用 +// 邀请码被注册使用. type InvitationRegister struct { InvitationCode string `gorm:"column:invitation_code;primary_key;type:char(32)"` UsedByUserID string `gorm:"column:user_id;index:userID;type:char(64)"` diff --git a/pkg/common/db/table/admin/ip_forbidden.go b/pkg/common/db/table/admin/ip_forbidden.go index 81e8759e9..5fc5e49f2 100644 --- a/pkg/common/db/table/admin/ip_forbidden.go +++ b/pkg/common/db/table/admin/ip_forbidden.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package admin import ( @@ -5,7 +19,7 @@ import ( "time" ) -// 禁止ip登录 注册 +// 禁止ip登录 注册. type IPForbidden struct { IP string `gorm:"column:ip;primary_key;type:char(32)"` LimitRegister bool `gorm:"column:limit_register"` diff --git a/pkg/common/db/table/admin/limit_user_login_ip.go b/pkg/common/db/table/admin/limit_user_login_ip.go index da5a29b22..8a47a3094 100644 --- a/pkg/common/db/table/admin/limit_user_login_ip.go +++ b/pkg/common/db/table/admin/limit_user_login_ip.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package admin import ( @@ -5,7 +19,7 @@ import ( "time" ) -// 限制userID只能在某些ip登录 +// 限制userID只能在某些ip登录. type LimitUserLoginIP struct { UserID string `gorm:"column:user_id;primary_key;type:char(64)"` IP string `gorm:"column:ip;primary_key;type:char(32)"` diff --git a/pkg/common/db/table/admin/register_add_friend.go b/pkg/common/db/table/admin/register_add_friend.go index ea45a019d..9601fda84 100644 --- a/pkg/common/db/table/admin/register_add_friend.go +++ b/pkg/common/db/table/admin/register_add_friend.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package admin import ( @@ -5,7 +19,7 @@ import ( "time" ) -// RegisterAddFriend 注册时默认好友 +// RegisterAddFriend 注册时默认好友. type RegisterAddFriend struct { UserID string `gorm:"column:user_id;primary_key;type:char(64)"` CreateTime time.Time `gorm:"column:create_time"` diff --git a/pkg/common/db/table/admin/register_add_group.go b/pkg/common/db/table/admin/register_add_group.go index 2f311bb34..5474929f7 100644 --- a/pkg/common/db/table/admin/register_add_group.go +++ b/pkg/common/db/table/admin/register_add_group.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package admin import ( @@ -5,7 +19,7 @@ import ( "time" ) -// RegisterAddGroup 注册时默认群组 +// RegisterAddGroup 注册时默认群组. type RegisterAddGroup struct { GroupID string `gorm:"column:group_id;primary_key;type:char(64)"` CreateTime time.Time `gorm:"column:create_time"` diff --git a/pkg/common/db/table/chat/account.go b/pkg/common/db/table/chat/account.go index 227008d29..ed633070e 100644 --- a/pkg/common/db/table/chat/account.go +++ b/pkg/common/db/table/chat/account.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package chat import ( @@ -5,7 +19,7 @@ import ( "time" ) -// Account 账号密码表 +// Account 账号密码表. type Account struct { UserID string `gorm:"column:user_id;primary_key;type:char(64)"` Password string `gorm:"column:password;type:varchar(32)"` diff --git a/pkg/common/db/table/chat/attribute.go b/pkg/common/db/table/chat/attribute.go index 4d310cb60..c06fd08e6 100644 --- a/pkg/common/db/table/chat/attribute.go +++ b/pkg/common/db/table/chat/attribute.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package chat import ( @@ -5,23 +19,24 @@ import ( "time" ) -// Attribute 用户属性表 +// Attribute 用户属性表. type Attribute struct { - UserID string `gorm:"column:user_id;primary_key;type:char(64)"` - Account string `gorm:"column:account;type:char(64)"` - PhoneNumber string `gorm:"column:phone_number;type:varchar(32)"` - AreaCode string `gorm:"column:area_code;type:varchar(8)"` - Email string `gorm:"column:email;type:varchar(64)" ` - Nickname string `gorm:"column:nickname;type:varchar(64)" ` - FaceURL string `gorm:"column:face_url;type:varchar(255)" ` - Gender int32 `gorm:"column:gender"` - CreateTime time.Time `gorm:"column:create_time"` - ChangeTime time.Time `gorm:"column:change_time"` - BirthTime time.Time `gorm:"column:birth_time"` - Level int32 `gorm:"column:level;default:1"` - AllowVibration int32 `gorm:"column:allow_vibration;default:1"` - AllowBeep int32 `gorm:"column:allow_beep;default:1"` - AllowAddFriend int32 `gorm:"column:allow_add_friend;default:1"` + UserID string `gorm:"column:user_id;primary_key;type:char(64)"` + Account string `gorm:"column:account;type:char(64)"` + PhoneNumber string `gorm:"column:phone_number;type:varchar(32)"` + AreaCode string `gorm:"column:area_code;type:varchar(8)"` + Email string `gorm:"column:email;type:varchar(64)" ` + Nickname string `gorm:"column:nickname;type:varchar(64)" ` + FaceURL string `gorm:"column:face_url;type:varchar(255)" ` + Gender int32 `gorm:"column:gender"` + CreateTime time.Time `gorm:"column:create_time"` + ChangeTime time.Time `gorm:"column:change_time"` + BirthTime time.Time `gorm:"column:birth_time"` + Level int32 `gorm:"column:level;default:1"` + AllowVibration int32 `gorm:"column:allow_vibration;default:1"` + AllowBeep int32 `gorm:"column:allow_beep;default:1"` + AllowAddFriend int32 `gorm:"column:allow_add_friend;default:1"` + GlobalRecvMsgOpt int32 `gorm:"column:global_recv_msg_opt;default:0"` } func (Attribute) TableName() string { @@ -38,4 +53,6 @@ type AttributeInterface interface { TakePhone(ctx context.Context, areaCode string, phoneNumber string) (*Attribute, error) TakeAccount(ctx context.Context, account string) (*Attribute, error) Take(ctx context.Context, userID string) (*Attribute, error) + GetAccountList(ctx context.Context, accountList []string) ([]*Attribute, error) + ExistPhoneNumber(ctx context.Context, areaCode, phoneNumber string) (bool, error) } diff --git a/pkg/common/db/table/chat/ip_forbidden.go b/pkg/common/db/table/chat/ip_forbidden.go new file mode 100644 index 000000000..d50ddd8c2 --- /dev/null +++ b/pkg/common/db/table/chat/ip_forbidden.go @@ -0,0 +1,7 @@ +package chat + +import "context" + +type IPForbiddenInterface interface { + Restriction(ctx context.Context, ip string, isLogin bool) (bool, error) +} diff --git a/pkg/common/db/table/chat/register.go b/pkg/common/db/table/chat/register.go index 78bd8bf76..af6712911 100644 --- a/pkg/common/db/table/chat/register.go +++ b/pkg/common/db/table/chat/register.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package chat import ( @@ -5,14 +19,14 @@ import ( "time" ) -// Register 注册信息表 +// Register 注册信息表. type Register struct { UserID string `gorm:"column:user_id;primary_key;type:char(64)"` DeviceID string `gorm:"column:device_id;type:varchar(255)"` IP string `gorm:"column:ip;type:varchar(64)"` Platform string `gorm:"column:platform;type:varchar(32)"` - AccountType string `gorm:"column:account_type;type:varchar(32)"` //email phone account - Mode string `gorm:"column:mode;type:varchar(32)"` //user admin + AccountType string `gorm:"column:account_type;type:varchar(32)"` // email phone account + Mode string `gorm:"column:mode;type:varchar(32)"` // user admin CreateTime time.Time `gorm:"column:create_time"` } diff --git a/pkg/common/db/table/chat/user_login_record.go b/pkg/common/db/table/chat/user_login_record.go index 594717e89..7cacf4163 100644 --- a/pkg/common/db/table/chat/user_login_record.go +++ b/pkg/common/db/table/chat/user_login_record.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package chat import ( @@ -5,7 +19,7 @@ import ( "time" ) -// 用户登录信息表 +// 用户登录信息表. type UserLoginRecord struct { UserID string `gorm:"column:user_id;size:64"` LoginTime time.Time `gorm:"column:login_time"` diff --git a/pkg/common/db/table/chat/verify_code.go b/pkg/common/db/table/chat/verify_code.go index 0a1a4d7bc..995c1ebb8 100644 --- a/pkg/common/db/table/chat/verify_code.go +++ b/pkg/common/db/table/chat/verify_code.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package chat import ( diff --git a/pkg/common/db/table/organization/department.go b/pkg/common/db/table/organization/department.go new file mode 100644 index 000000000..0fd1ebc87 --- /dev/null +++ b/pkg/common/db/table/organization/department.go @@ -0,0 +1,33 @@ +package organization + +import ( + "context" + "time" +) + +type Department struct { + DepartmentID string `gorm:"column:department_id;primary_key;size:64" json:"departmentID"` + FaceURL string `gorm:"column:face_url;size:255" json:"faceURL"` + Name string `gorm:"column:name;size:256" json:"name" binding:"required"` + ParentID string `gorm:"column:parent_id;size:64" json:"parentID" binding:"required"` // "0" or Real parent id + Order int32 `gorm:"column:order" json:"order" ` // 1, 2, ... + DepartmentType int32 `gorm:"column:department_type" json:"departmentType"` //1, 2... + RelatedGroupID string `gorm:"column:related_group_id;size:64" json:"relatedGroupID"` + CreateTime time.Time `gorm:"column:create_time" json:"createTime"` + ChangeTime time.Time `gorm:"column:change_time" json:"changeTime"` +} + +type DepartmentInterface interface { + Create(ctx context.Context, department ...*Department) error + FindOne(ctx context.Context, departmentID string) (*Department, error) + Update(ctx context.Context, department *Department) error + GetParent(ctx context.Context, id string) ([]*Department, error) + GetList(ctx context.Context, departmentIdList []string) ([]*Department, error) + UpdateParentID(ctx context.Context, oldParentID, newParentID string) error + Delete(ctx context.Context, departmentIDList []string) error + GetDepartment(ctx context.Context, departmentID string) (*Department, error) + GetMaxOrder(ctx context.Context, parentID string) (int32, error) + UpdateOrderIncrement(ctx context.Context, parentID string, startOrder int32) error + UpdateParentIDOrder(ctx context.Context, departmentID, parentID string, order int32) error + GetByName(ctx context.Context, name string, id string) (*Department, error) +} diff --git a/pkg/common/db/table/organization/departmentMember.go b/pkg/common/db/table/organization/departmentMember.go new file mode 100644 index 000000000..a0722bbd8 --- /dev/null +++ b/pkg/common/db/table/organization/departmentMember.go @@ -0,0 +1,34 @@ +package organization + +import ( + "context" + "time" +) + +type DepartmentMember struct { + UserID string `gorm:"column:user_id;primary_key;size:64"` + DepartmentID string `gorm:"column:department_id;primary_key;size:64"` + Order int32 `gorm:"column:order" json:"order"` //1,2 + Position string `gorm:"column:position;size:256" json:"position"` + Leader int32 `gorm:"column:leader" json:"leader"` //-1, 1 + Status int32 `gorm:"column:status" json:"status"` //-1, 1 + EntryTime time.Time `gorm:"column:entry_time"` // 入职时间 + TerminationTime *time.Time `gorm:"column:termination_time"` // 离职时间 + CreateTime time.Time `gorm:"column:create_time"` + ChangeTime time.Time `gorm:"column:change_time" json:"changeTime"` +} + +type DepartmentMemberInterface interface { + FindByDepartmentID(ctx context.Context, departmentIDList []string) ([]*DepartmentMember, error) + DeleteDepartmentIDList(ctx context.Context, departmentIDList []string) error + DeleteByUserID(ctx context.Context, userID string) error + Create(ctx context.Context, m *DepartmentMember) error + Get(ctx context.Context, userID string) ([]*DepartmentMember, error) + DeleteByKey(ctx context.Context, userID string, departmentID string) error + Update(ctx context.Context, m *DepartmentMember) error + FindByUserID(ctx context.Context, userIDList []string) ([]*DepartmentMember, error) + GetUserListInDepartment(ctx context.Context, departmentID string, userIDList []string) ([]*DepartmentMember, error) + GetByDepartmentID(ctx context.Context, departmentID string) ([]*DepartmentMember, error) + CreateList(ctx context.Context, members []*DepartmentMember) error + GetByKey(ctx context.Context, userID, departmentID string) (*DepartmentMember, error) +} diff --git a/pkg/common/db/table/organization/organization.go b/pkg/common/db/table/organization/organization.go new file mode 100644 index 000000000..f7bbe0d7f --- /dev/null +++ b/pkg/common/db/table/organization/organization.go @@ -0,0 +1,24 @@ +package organization + +import ( + "context" + "gorm.io/gorm" + "time" +) + +type Organization struct { + LogoURL string `gorm:"column:logo_url;size:255" json:"logoURL"` + Name string `gorm:"column:name;size:256" json:"name" binding:"required"` + Homepage string `gorm:"column:homepage" json:"homepage" ` + RelatedGroupID string `gorm:"column:related_group_id;size:64" json:"relatedGroupID"` + Introduction string `gorm:"column:introduction;size:255" json:"introduction"` + DefaultPassword string `gorm:"column:default_password" json:"defaultPassword"` + CreateTime time.Time `gorm:"column:create_time" json:"createTime"` + ChangeTime time.Time `gorm:"column:change_time" json:"changeTime"` +} + +type OrganizationInterface interface { + Set(ctx context.Context, m *Organization) error + Get(ctx context.Context) (*Organization, error) + BeginTransaction(ctx context.Context) (*gorm.DB, error) +} diff --git a/pkg/common/db/table/organization/organizationUser.go b/pkg/common/db/table/organization/organizationUser.go new file mode 100644 index 000000000..1e0a22ae2 --- /dev/null +++ b/pkg/common/db/table/organization/organizationUser.go @@ -0,0 +1,38 @@ +package organization + +import ( + "context" + "github.com/OpenIMSDK/chat/pkg/proto/organization" + "time" +) + +type OrganizationUser struct { + UserID string `gorm:"column:user_id;primary_key;size:64"` + Nickname string `gorm:"column:nickname;size:256"` + EnglishName string `gorm:"column:english_name;size:256"` + FaceURL string `gorm:"column:face_url;size:256"` + Gender int32 `gorm:"column:gender"` //1 ,2 + Station string `gorm:"column:station;size:256"` + AreaCode string `gorm:"column:area_code;size:32"` + Mobile string `gorm:"column:mobile;size:32"` + Telephone string `gorm:"column:telephone;size:32"` + Birth time.Time `gorm:"column:birth"` + Email string `gorm:"column:email;size:64"` + Order int32 `gorm:"column:order" json:"order"` + Status int32 `gorm:"column:status" json:"status"` //-1, 1 + CreateTime time.Time `gorm:"column:create_time"` + ChangeTime time.Time `gorm:"column:change_time" json:"changeTime"` +} + +type OrganizationUserInterface interface { + Create(ctx context.Context, m *OrganizationUser) error + Update(ctx context.Context, m *OrganizationUser) error + Delete(ctx context.Context, userID string) error + Get(ctx context.Context, userID string) (*OrganizationUser, error) + SearchPage(ctx context.Context, positionList, userIDList []string, text string, sort []*organization.GetSearchUserListSort, pageNumber uint32, showNumber uint32) (uint32, []*OrganizationUser, error) + GetNoDepartmentUserIDList(ctx context.Context) ([]string, error) + GetList(ctx context.Context, userIDList []string) ([]*OrganizationUser, error) + Search(ctx context.Context, positionList, userIDList []string, text string, sort []*organization.GetSearchUserListSort) ([]*OrganizationUser, error) + GetPage(ctx context.Context, pageNumber, showNumber int) (int64, []*OrganizationUser, error) + SearchV2(ctx context.Context, text string, userIDList []string, pageNumber, showNumber int) (int64, []*OrganizationUser, error) +} diff --git a/pkg/common/dbconn/gorm.go b/pkg/common/dbconn/gorm.go index 017410d7d..65366da43 100644 --- a/pkg/common/dbconn/gorm.go +++ b/pkg/common/dbconn/gorm.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package dbconn import ( @@ -15,7 +29,7 @@ import ( func NewMysqlGormDB() (*gorm.DB, error) { dsn := fmt.Sprintf("%s:%s@tcp(%s)/%s?charset=utf8mb4&parseTime=true&loc=Local", - *config.Config.Mysql.DBUserName, *config.Config.Mysql.DBPassword, (*config.Config.Mysql.DBAddress)[0], "mysql") + *config.Config.Mysql.Username, *config.Config.Mysql.Password, (*config.Config.Mysql.Address)[0], "mysql") db, err := gorm.Open(mysql.Open(dsn), nil) if err != nil { time.Sleep(time.Duration(30) * time.Second) @@ -29,13 +43,13 @@ func NewMysqlGormDB() (*gorm.DB, error) { return nil, err } defer sqlDB.Close() - sql := fmt.Sprintf("CREATE DATABASE IF NOT EXISTS %s default charset utf8 COLLATE utf8_general_ci;", *config.Config.Mysql.DBDatabaseName) + sql := fmt.Sprintf("CREATE DATABASE IF NOT EXISTS %s default charset utf8mb4 COLLATE utf8mb4_unicode_ci;", *config.Config.Mysql.Database) err = db.Exec(sql).Error if err != nil { return nil, fmt.Errorf("init db %w", err) } dsn = fmt.Sprintf("%s:%s@tcp(%s)/%s?charset=utf8mb4&parseTime=true&loc=Local", - *config.Config.Mysql.DBUserName, *config.Config.Mysql.DBPassword, (*config.Config.Mysql.DBAddress)[0], *config.Config.Mysql.DBDatabaseName) + *config.Config.Mysql.Username, *config.Config.Mysql.Password, (*config.Config.Mysql.Address)[0], *config.Config.Mysql.Database) sqlLogger := log.NewSqlLogger(logger.LogLevel(*config.Config.Mysql.LogLevel), true, time.Duration(*config.Config.Mysql.SlowThreshold)*time.Millisecond) db, err = gorm.Open(mysql.Open(dsn), &gorm.Config{ Logger: sqlLogger, @@ -47,9 +61,9 @@ func NewMysqlGormDB() (*gorm.DB, error) { if err != nil { return nil, err } - sqlDB.SetConnMaxLifetime(time.Second * time.Duration(*config.Config.Mysql.DBMaxLifeTime)) - sqlDB.SetMaxOpenConns(*config.Config.Mysql.DBMaxOpenConns) - sqlDB.SetMaxIdleConns(*config.Config.Mysql.DBMaxIdleConns) + sqlDB.SetConnMaxLifetime(time.Second * time.Duration(*config.Config.Mysql.MaxLifeTime)) + sqlDB.SetMaxOpenConns(*config.Config.Mysql.MaxOpenConn) + sqlDB.SetMaxIdleConns(*config.Config.Mysql.MaxIdleConn) return db, nil } diff --git a/pkg/common/mctx/get.go b/pkg/common/mctx/get.go index 37d44e631..e6fd57bba 100644 --- a/pkg/common/mctx/get.go +++ b/pkg/common/mctx/get.go @@ -1,12 +1,28 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package mctx import ( "context" + "strconv" + constant2 "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" + "github.com/OpenIMSDK/chat/pkg/common/constant" "github.com/OpenIMSDK/chat/pkg/common/tokenverify" - "strconv" ) func HaveOpUser(ctx context.Context) bool { diff --git a/pkg/common/tokenverify/token_verify.go b/pkg/common/tokenverify/token_verify.go index 847f02217..eac9461ca 100644 --- a/pkg/common/tokenverify/token_verify.go +++ b/pkg/common/tokenverify/token_verify.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package tokenverify import ( @@ -20,26 +34,26 @@ type claims struct { jwt.RegisteredClaims } -func buildClaims(userID string, userType int32, ttlDay int64) claims { +func buildClaims(userID string, userType int32, ttl int64) claims { now := time.Now() before := now.Add(-time.Minute * 5) return claims{ UserID: userID, UserType: userType, RegisteredClaims: jwt.RegisteredClaims{ - ExpiresAt: jwt.NewNumericDate(now.Add(time.Duration(ttlDay*24) * time.Hour)), //Expiration time - IssuedAt: jwt.NewNumericDate(now), //Issuing time - NotBefore: jwt.NewNumericDate(before), //Begin Effective time + ExpiresAt: jwt.NewNumericDate(now.Add(time.Duration(ttl*24) * time.Hour)), //Expiration time + IssuedAt: jwt.NewNumericDate(now), //Issuing time + NotBefore: jwt.NewNumericDate(before), //Begin Effective time }} } -func CreateToken(UserID string, userType int32, ttlDay int64) (string, error) { +func CreateToken(UserID string, userType int32, ttl int64) (string, error) { if !(userType == TokenUser || userType == TokenAdmin) { return "", errs.ErrTokenUnknown.Wrap("token type unknown") } - claims := buildClaims(UserID, userType, ttlDay) + claims := buildClaims(UserID, userType, ttl) token := jwt.NewWithClaims(jwt.SigningMethodHS256, claims) - tokenString, err := token.SignedString([]byte(config.Config.TokenPolicy.AccessSecret)) + tokenString, err := token.SignedString([]byte(*config.Config.Secret)) if err != nil { return "", utils.Wrap(err, "") } @@ -48,7 +62,7 @@ func CreateToken(UserID string, userType int32, ttlDay int64) (string, error) { func secret() jwt.Keyfunc { return func(token *jwt.Token) (interface{}, error) { - return []byte(config.Config.TokenPolicy.AccessSecret), nil + return []byte(*config.Config.Secret), nil } } diff --git a/pkg/common/xlsx/main.go b/pkg/common/xlsx/main.go new file mode 100644 index 000000000..c2f49e751 --- /dev/null +++ b/pkg/common/xlsx/main.go @@ -0,0 +1,179 @@ +package xlsx + +import ( + "errors" + "github.com/xuri/excelize/v2" + "io" + "reflect" +) + +func ParseSheet(file *excelize.File, v interface{}) error { + val := reflect.ValueOf(v) + if val.Kind() != reflect.Ptr { + return errors.New("not ptr") + } + val = val.Elem() + if val.Kind() != reflect.Slice { + return errors.New("not slice") + } + itemType := val.Type().Elem() + if itemType.Kind() != reflect.Struct { + return errors.New("not struct") + } + newItemValue := func() reflect.Value { + return reflect.New(itemType).Elem() + } + putItem := func(v reflect.Value) { + val.Set(reflect.Append(val, v)) + } + var sheetName string + if s, ok := newItemValue().Interface().(SheetName); ok { + sheetName = s.SheetName() + } else { + sheetName = itemType.Name() + } + + if sheetIndex, err := file.GetSheetIndex(sheetName); err != nil { + return err + } else if sheetIndex < 0 { + return nil + } + fieldIndex := make(map[string]int) // 结构体对应的下标 + for i := 0; i < itemType.NumField(); i++ { + field := itemType.Field(i) + alias := field.Tag.Get("column") + switch alias { + case "": + fieldIndex[field.Name] = i + case "-": + continue + default: + fieldIndex[alias] = i + } + } + if len(fieldIndex) == 0 { + return errors.New("empty column struct") + } + sheetIndex := make(map[string]int) // sheet 对应的下标 + for i := 1; ; i++ { // 第一行 + name, err := file.GetCellValue(sheetName, GetAxis(i, 1)) + if err != nil { + return err + } + if name == "" { + break + } + if _, ok := fieldIndex[name]; ok { + sheetIndex[name] = i + } + } + if len(sheetIndex) == 0 { + return errors.New("sheet column empty") + } + for i := 2; ; i++ { + var ( + notEmpty int + item = newItemValue() + ) + for column, index := range sheetIndex { + s, err := file.GetCellValue(sheetName, GetAxis(index, i)) + if err != nil { + return err + } + if s == "" { + continue + } + notEmpty++ + if err = String2Value(s, item.Field(fieldIndex[column])); err != nil { + return err + } + } + if notEmpty > 0 { // 空行表示结束 + putItem(item) + } else { + break + } + } + return nil +} + +func GenXlsx(file *excelize.File, v interface{}) error { + val := reflect.ValueOf(v) + if val.Kind() == reflect.Ptr { + val = val.Elem() + } + if val.Kind() != reflect.Slice { + return errors.New("not slice") + } + itemType := val.Type().Elem() + if itemType.Kind() != reflect.Struct { + return errors.New("not struct") + } + newItemValue := func() reflect.Value { + return reflect.New(itemType).Elem() + } + var sheetName string + if s, ok := newItemValue().Interface().(SheetName); ok { + sheetName = s.SheetName() + } else { + sheetName = itemType.Name() + } + var ( + columns []string + fieldIndex = make(map[string]int) // 结构体对应的下标 + ) + for i := 0; i < itemType.NumField(); i++ { + field := itemType.Field(i) + alias := field.Tag.Get("column") + switch alias { + case "": + columns = append(columns, field.Name) + fieldIndex[field.Name] = i + case "-": + continue + default: + columns = append(columns, alias) + fieldIndex[alias] = i + } + } + if len(columns) == 0 { + return errors.New("empty column struct") + } + if len(columns) != len(fieldIndex) { + return errors.New("struct column repeat") + } + file.DeleteSheet(sheetName) + file.NewSheet(sheetName) + + for x, column := range columns { + if err := file.SetCellValue(sheetName, GetAxis(x+1, 1), column); err != nil { + return err + } + } + for i := 0; i < val.Len(); i++ { // y + item := val.Index(i) + for x, column := range columns { + if err := file.SetCellValue(sheetName, GetAxis(x+1, i+2), item.Field(fieldIndex[column]).Interface()); err != nil { + return err + } + } + } + return nil +} + +func ParseAll(r io.Reader, models ...interface{}) error { + if len(models) == 0 { + return errors.New("empty models") + } + file, err := excelize.OpenReader(r) + if err != nil { + return err + } + defer file.Close() + for i := 0; i < len(models); i++ { + if err := ParseSheet(file, models[i]); err != nil { + return err + } + } + return nil +} diff --git a/pkg/common/xlsx/model/department.go b/pkg/common/xlsx/model/department.go new file mode 100644 index 000000000..e39854e0d --- /dev/null +++ b/pkg/common/xlsx/model/department.go @@ -0,0 +1,14 @@ +package model + +type Department struct { + DepartmentID string `column:"ID"` + Name string `column:"名字"` + FaceURL string `column:"头像"` + Parent string `column:"上级部门"` // 开发/后端/Go + RelatedGroupID string `column:"相关组"` + DepartmentType int32 `column:"类型"` +} + +func (Department) SheetName() string { + return "部门" +} diff --git a/pkg/common/xlsx/model/organization_user.go b/pkg/common/xlsx/model/organization_user.go new file mode 100644 index 000000000..ceeeda11a --- /dev/null +++ b/pkg/common/xlsx/model/organization_user.go @@ -0,0 +1,22 @@ +package model + +type OrganizationUser struct { + UserID string `column:"ID"` + Nickname string `column:"昵称"` + EnglishName string `column:"英文名"` + FaceURL string `column:"头像"` + Gender string `column:"性别"` + Station string `column:"工位"` + AreaCode string `column:"区号"` + Mobile string `column:"手机号"` + Telephone string `column:"固定电话"` + Birth string `column:"生日"` + Email string `column:"邮箱"` + Account string `column:"账号"` + Password string `column:"密码"` + Department string `column:"所在部门"` // 开发/后端/Go:职位1;销售/后端/Go:职位2 +} + +func (OrganizationUser) SheetName() string { + return "用户" +} diff --git a/pkg/common/xlsx/sheet.go b/pkg/common/xlsx/sheet.go new file mode 100644 index 000000000..f5a90d6e1 --- /dev/null +++ b/pkg/common/xlsx/sheet.go @@ -0,0 +1,5 @@ +package xlsx + +type SheetName interface { + SheetName() string +} diff --git a/pkg/common/xlsx/utils.go b/pkg/common/xlsx/utils.go new file mode 100644 index 000000000..af8a8a233 --- /dev/null +++ b/pkg/common/xlsx/utils.go @@ -0,0 +1,204 @@ +package xlsx + +import ( + "errors" + "fmt" + "github.com/xuri/excelize/v2" + "io" + "reflect" + "strconv" + "strings" +) + +func Open(r io.Reader) (*excelize.File, error) { + return excelize.OpenReader(r) +} + +func GetAxis(x, y int) string { + return Num2AZ(x) + strconv.Itoa(y) +} + +func Num2AZ(num int) string { + var ( + str string + k int + temp []int //保存转化后每一位数据的值,然后通过索引的方式匹配A-Z + ) + //用来匹配的字符A-Z + slices := []string{"", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"} + + if num > 26 { //数据大于26需要进行拆分 + for { + k = num % 26 //从个位开始拆分,如果求余为0,说明末尾为26,也就是Z,如果是转化为26进制数,则末尾是可以为0的,这里必须为A-Z中的一个 + if k == 0 { + temp = append(temp, 26) + k = 26 + } else { + temp = append(temp, k) + } + num = (num - k) / 26 //减去num最后一位数的值,因为已经记录在temp中 + if num <= 26 { //小于等于26直接进行匹配,不需要进行数据拆分 + temp = append(temp, num) + break + } + } + } else { + return slices[num] + } + for _, value := range temp { + str = slices[value] + str //因为数据切分后存储顺序是反的,所以str要放在后面 + } + return str +} + +func String2Value(s string, rv reflect.Value) error { + var ( + val interface{} + err error + ) + if s == "" { + val, err = ZeroValue(rv.Kind()) + } else { + switch rv.Kind() { + case reflect.Bool: + switch strings.ToLower(s) { + case "false": + case "f": + case "0": + val = false + case "true": + case "t": + case "1": + val = true + default: + return fmt.Errorf("parse %s to bool error", s) + } + case reflect.Int: + val, err = strconv.Atoi(s) + case reflect.Int8: + t, err := strconv.ParseInt(s, 10, 8) + if err != nil { + return err + } + val = int8(t) + case reflect.Int16: + t, err := strconv.ParseInt(s, 10, 16) + if err != nil { + return err + } + val = int16(t) + case reflect.Int32: + t, err := strconv.ParseInt(s, 10, 32) + if err != nil { + return err + } + val = int32(t) + case reflect.Int64: + val, err = strconv.ParseInt(s, 10, 64) + case reflect.Uint: + t, err := strconv.ParseUint(s, 10, 64) + if err != nil { + return err + } + val = uint(t) + case reflect.Uint8: + t, err := strconv.ParseUint(s, 10, 8) + if err != nil { + return err + } + val = uint8(t) + case reflect.Uint16: + t, err := strconv.ParseUint(s, 10, 16) + if err != nil { + return err + } + val = uint16(t) + case reflect.Uint32: + t, err := strconv.ParseUint(s, 10, 32) + if err != nil { + return err + } + val = uint32(t) + case reflect.Uint64: + val, err = strconv.ParseUint(s, 10, 64) + case reflect.Float32: + t, err := strconv.ParseFloat(s, 32) + if err != nil { + return err + } + val = float32(t) + case reflect.Float64: + val, err = strconv.ParseFloat(s, 64) + case reflect.String: + val = s + default: + return errors.New("not Supported " + rv.Kind().String()) + } + } + if err != nil { + return err + } + rv.Set(reflect.ValueOf(val)) + return nil +} + +func ZeroValue(kind reflect.Kind) (interface{}, error) { + var v interface{} + switch kind { + case reflect.Bool: + v = false + case reflect.Int: + v = int(0) + case reflect.Int8: + v = int8(0) + case reflect.Int16: + v = int16(0) + case reflect.Int32: + v = int32(0) + case reflect.Int64: + v = int64(0) + case reflect.Uint: + v = uint(0) + case reflect.Uint8: + v = uint8(0) + case reflect.Uint16: + v = uint16(0) + case reflect.Uint32: + v = uint32(0) + case reflect.Uint64: + v = uint64(0) + case reflect.Float32: + v = float32(0) + case reflect.Float64: + v = float64(0) + case reflect.String: + v = "" + default: + return nil, errors.New("not Supported " + kind.String()) + } + return v, nil +} + +func GetSheetName(v interface{}) string { + return getSheetName(reflect.TypeOf(v)) +} + +func getSheetName(t reflect.Type) string { + if t.Kind() == reflect.Ptr { + t = t.Elem() + } + if t.Kind() == reflect.Slice { + t = t.Elem() + } + if t.Kind() == reflect.Ptr { + t = t.Elem() + } + if t.Kind() != reflect.Struct { + return "" + } + if s, ok := reflect.New(t).Interface().(SheetName); ok { + return s.SheetName() + } else { + return t.Name() + } +} diff --git a/pkg/eerrs/predefine.go b/pkg/eerrs/predefine.go index e6865c60c..8e4e1544e 100644 --- a/pkg/eerrs/predefine.go +++ b/pkg/eerrs/predefine.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package eerrs import "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" diff --git a/pkg/proto/admin/admin.pb.go b/pkg/proto/admin/admin.pb.go index 26c47131e..f14c7c0eb 100644 --- a/pkg/proto/admin/admin.pb.go +++ b/pkg/proto/admin/admin.pb.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.29.1 @@ -93,8 +107,8 @@ type LoginResp struct { Nickname string `protobuf:"bytes,3,opt,name=nickname,proto3" json:"nickname"` FaceURL string `protobuf:"bytes,4,opt,name=faceURL,proto3" json:"faceURL"` Level int32 `protobuf:"varint,5,opt,name=level,proto3" json:"level"` - IMUserID string `protobuf:"bytes,6,opt,name=IMUserID,proto3" json:"IMUserID"` - IMToken string `protobuf:"bytes,7,opt,name=IMToken,proto3" json:"IMToken"` + ImUserID string `protobuf:"bytes,6,opt,name=imUserID,proto3" json:"imUserID"` + ImToken string `protobuf:"bytes,7,opt,name=imToken,proto3" json:"imToken"` } func (x *LoginResp) Reset() { @@ -164,16 +178,16 @@ func (x *LoginResp) GetLevel() int32 { return 0 } -func (x *LoginResp) GetIMUserID() string { +func (x *LoginResp) GetImUserID() string { if x != nil { - return x.IMUserID + return x.ImUserID } return "" } -func (x *LoginResp) GetIMToken() string { +func (x *LoginResp) GetImToken() string { if x != nil { - return x.IMToken + return x.ImToken } return "" } @@ -4737,10 +4751,10 @@ var file_admin_admin_proto_rawDesc = []byte{ 0x65, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x61, 0x63, 0x65, 0x55, 0x52, 0x4c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x66, 0x61, 0x63, 0x65, 0x55, 0x52, 0x4c, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, - 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x49, 0x4d, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x49, 0x4d, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x18, 0x0a, - 0x07, 0x49, 0x4d, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x49, 0x4d, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x85, 0x03, 0x0a, 0x12, 0x41, 0x64, 0x6d, 0x69, + 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x18, 0x0a, + 0x07, 0x69, 0x6d, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x69, 0x6d, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x85, 0x03, 0x0a, 0x12, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x12, 0x3c, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x70, diff --git a/pkg/proto/admin/admin.proto b/pkg/proto/admin/admin.proto index 010b0b535..dd9f1651a 100644 --- a/pkg/proto/admin/admin.proto +++ b/pkg/proto/admin/admin.proto @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + syntax = "proto3"; package OpenIMChat.admin; import "pub/wrapperspb.proto"; @@ -17,8 +31,8 @@ message LoginResp { string nickname = 3; string faceURL = 4; int32 level = 5; - string IMUserID = 6; - string IMToken = 7; + string imUserID = 6; + string imToken = 7; } message AdminUpdateInfoReq { diff --git a/pkg/proto/chat/chat.pb.go b/pkg/proto/chat/chat.pb.go index 5caf5dcb0..41016273c 100644 --- a/pkg/proto/chat/chat.pb.go +++ b/pkg/proto/chat/chat.pb.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.29.1 @@ -119,19 +133,20 @@ type UpdateUserInfoReq struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"` - Account *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=account,proto3" json:"account"` - PhoneNumber *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=phoneNumber,proto3" json:"phoneNumber"` - AreaCode *wrapperspb.StringValue `protobuf:"bytes,4,opt,name=areaCode,proto3" json:"areaCode"` - Email *wrapperspb.StringValue `protobuf:"bytes,5,opt,name=email,proto3" json:"email"` - Nickname *wrapperspb.StringValue `protobuf:"bytes,6,opt,name=nickname,proto3" json:"nickname"` - FaceURL *wrapperspb.StringValue `protobuf:"bytes,7,opt,name=faceURL,proto3" json:"faceURL"` - Gender *wrapperspb.Int32Value `protobuf:"bytes,8,opt,name=gender,proto3" json:"gender"` - Level *wrapperspb.Int32Value `protobuf:"bytes,9,opt,name=level,proto3" json:"level"` - Birth *wrapperspb.Int64Value `protobuf:"bytes,10,opt,name=birth,proto3" json:"birth"` - AllowAddFriend *wrapperspb.Int32Value `protobuf:"bytes,11,opt,name=allowAddFriend,proto3" json:"allowAddFriend"` - AllowBeep *wrapperspb.Int32Value `protobuf:"bytes,12,opt,name=allowBeep,proto3" json:"allowBeep"` - AllowVibration *wrapperspb.Int32Value `protobuf:"bytes,13,opt,name=allowVibration,proto3" json:"allowVibration"` + UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"` + Account *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=account,proto3" json:"account"` + PhoneNumber *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=phoneNumber,proto3" json:"phoneNumber"` + AreaCode *wrapperspb.StringValue `protobuf:"bytes,4,opt,name=areaCode,proto3" json:"areaCode"` + Email *wrapperspb.StringValue `protobuf:"bytes,5,opt,name=email,proto3" json:"email"` + Nickname *wrapperspb.StringValue `protobuf:"bytes,6,opt,name=nickname,proto3" json:"nickname"` + FaceURL *wrapperspb.StringValue `protobuf:"bytes,7,opt,name=faceURL,proto3" json:"faceURL"` + Gender *wrapperspb.Int32Value `protobuf:"bytes,8,opt,name=gender,proto3" json:"gender"` + Level *wrapperspb.Int32Value `protobuf:"bytes,9,opt,name=level,proto3" json:"level"` + Birth *wrapperspb.Int64Value `protobuf:"bytes,10,opt,name=birth,proto3" json:"birth"` + AllowAddFriend *wrapperspb.Int32Value `protobuf:"bytes,11,opt,name=allowAddFriend,proto3" json:"allowAddFriend"` + AllowBeep *wrapperspb.Int32Value `protobuf:"bytes,12,opt,name=allowBeep,proto3" json:"allowBeep"` + AllowVibration *wrapperspb.Int32Value `protobuf:"bytes,13,opt,name=allowVibration,proto3" json:"allowVibration"` + GlobalRecvMsgOpt *wrapperspb.Int32Value `protobuf:"bytes,14,opt,name=globalRecvMsgOpt,proto3" json:"globalRecvMsgOpt"` } func (x *UpdateUserInfoReq) Reset() { @@ -257,6 +272,13 @@ func (x *UpdateUserInfoReq) GetAllowVibration() *wrapperspb.Int32Value { return nil } +func (x *UpdateUserInfoReq) GetGlobalRecvMsgOpt() *wrapperspb.Int32Value { + if x != nil { + return x.GlobalRecvMsgOpt + } + return nil +} + type UpdateUserInfoResp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2273,6 +2295,116 @@ func (*OpenIMCallbackResp) Descriptor() ([]byte, []int) { return file_chat_chat_proto_rawDescGZIP(), []int{34} } +type GetAccountUserReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Operation *common.Operation `protobuf:"bytes,1,opt,name=operation,proto3" json:"operation"` + AccountList []string `protobuf:"bytes,2,rep,name=accountList,proto3" json:"accountList"` +} + +func (x *GetAccountUserReq) Reset() { + *x = GetAccountUserReq{} + if protoimpl.UnsafeEnabled { + mi := &file_chat_chat_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetAccountUserReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAccountUserReq) ProtoMessage() {} + +func (x *GetAccountUserReq) ProtoReflect() protoreflect.Message { + mi := &file_chat_chat_proto_msgTypes[35] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAccountUserReq.ProtoReflect.Descriptor instead. +func (*GetAccountUserReq) Descriptor() ([]byte, []int) { + return file_chat_chat_proto_rawDescGZIP(), []int{35} +} + +func (x *GetAccountUserReq) GetOperation() *common.Operation { + if x != nil { + return x.Operation + } + return nil +} + +func (x *GetAccountUserReq) GetAccountList() []string { + if x != nil { + return x.AccountList + } + return nil +} + +type GetAccountUserResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CommonResp *common.CommonResp `protobuf:"bytes,1,opt,name=commonResp,proto3" json:"commonResp"` + Accounts map[string]string `protobuf:"bytes,2,rep,name=accounts,proto3" json:"accounts" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // account userID +} + +func (x *GetAccountUserResp) Reset() { + *x = GetAccountUserResp{} + if protoimpl.UnsafeEnabled { + mi := &file_chat_chat_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetAccountUserResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAccountUserResp) ProtoMessage() {} + +func (x *GetAccountUserResp) ProtoReflect() protoreflect.Message { + mi := &file_chat_chat_proto_msgTypes[36] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAccountUserResp.ProtoReflect.Descriptor instead. +func (*GetAccountUserResp) Descriptor() ([]byte, []int) { + return file_chat_chat_proto_rawDescGZIP(), []int{36} +} + +func (x *GetAccountUserResp) GetCommonResp() *common.CommonResp { + if x != nil { + return x.CommonResp + } + return nil +} + +func (x *GetAccountUserResp) GetAccounts() map[string]string { + if x != nil { + return x.Accounts + } + return nil +} + var File_chat_chat_proto protoreflect.FileDescriptor var file_chat_chat_proto_rawDesc = []byte{ @@ -2293,7 +2425,7 @@ var file_chat_chat_proto_rawDesc = []byte{ 0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xab, 0x06, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xfa, 0x06, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x3c, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, @@ -2344,352 +2476,384 @@ var file_chat_chat_proto_rawDesc = []byte{ 0x32, 0x21, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0e, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x56, 0x69, 0x62, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x22, 0x14, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, - 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x22, 0x31, 0x0a, 0x15, 0x46, 0x69, 0x6e, - 0x64, 0x55, 0x73, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x52, - 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x07, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x73, 0x22, 0x51, 0x0a, 0x16, - 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x6e, - 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x37, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, - 0x61, 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x50, 0x75, - 0x62, 0x6c, 0x69, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x22, - 0x94, 0x01, 0x0a, 0x17, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, 0x50, 0x75, - 0x62, 0x6c, 0x69, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x6b, - 0x65, 0x79, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b, 0x65, - 0x79, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x45, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x4f, 0x70, 0x65, 0x6e, - 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, - 0x67, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x05, 0x52, 0x07, 0x67, - 0x65, 0x6e, 0x64, 0x65, 0x72, 0x73, 0x22, 0x69, 0x0a, 0x18, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, + 0x69, 0x6f, 0x6e, 0x12, 0x4d, 0x0a, 0x10, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x52, 0x65, 0x63, + 0x76, 0x4d, 0x73, 0x67, 0x4f, 0x70, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, + 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x52, 0x10, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x52, 0x65, 0x63, 0x76, 0x4d, 0x73, 0x67, 0x4f, + 0x70, 0x74, 0x22, 0x14, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, + 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x22, 0x31, 0x0a, 0x15, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, - 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0d, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x37, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, - 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x55, 0x73, 0x65, 0x72, - 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, - 0x73, 0x22, 0x2f, 0x0a, 0x13, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x46, 0x75, 0x6c, - 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, - 0x49, 0x44, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x75, 0x73, 0x65, 0x72, 0x49, - 0x44, 0x73, 0x22, 0x4d, 0x0a, 0x14, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x46, 0x75, - 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x35, 0x0a, 0x05, 0x75, 0x73, - 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x4f, 0x70, 0x65, 0x6e, - 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x55, 0x73, - 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, - 0x73, 0x22, 0x92, 0x01, 0x0a, 0x15, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, - 0x46, 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x6b, - 0x65, 0x79, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b, 0x65, - 0x79, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x45, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x4f, 0x70, 0x65, 0x6e, - 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, - 0x67, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x05, 0x52, 0x07, 0x67, - 0x65, 0x6e, 0x64, 0x65, 0x72, 0x73, 0x22, 0x65, 0x0a, 0x16, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, - 0x55, 0x73, 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, - 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, - 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x35, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, - 0x61, 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x46, 0x75, - 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x22, 0xdb, 0x01, - 0x0a, 0x11, 0x53, 0x65, 0x6e, 0x64, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x64, 0x65, - 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x64, 0x46, 0x6f, 0x72, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x75, 0x73, 0x65, 0x64, 0x46, 0x6f, 0x72, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x12, 0x26, 0x0a, - 0x0e, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, - 0x44, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, - 0x44, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x1a, 0x0a, - 0x08, 0x61, 0x72, 0x65, 0x61, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x61, 0x72, 0x65, 0x61, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x68, 0x6f, - 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x14, 0x0a, 0x12, 0x53, - 0x65, 0x6e, 0x64, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x22, 0x6d, 0x0a, 0x0d, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x52, - 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x72, 0x65, 0x61, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, + 0x71, 0x12, 0x18, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x07, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x73, 0x22, 0x51, 0x0a, 0x16, 0x46, + 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x6e, 0x66, + 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x37, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, + 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x50, 0x75, 0x62, + 0x6c, 0x69, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x22, 0x94, + 0x01, 0x0a, 0x17, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, 0x50, 0x75, 0x62, + 0x6c, 0x69, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x6b, 0x65, + 0x79, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b, 0x65, 0x79, + 0x77, 0x6f, 0x72, 0x64, 0x12, 0x45, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, + 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x67, + 0x65, 0x6e, 0x64, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x05, 0x52, 0x07, 0x67, 0x65, + 0x6e, 0x64, 0x65, 0x72, 0x73, 0x22, 0x69, 0x0a, 0x18, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, + 0x73, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, + 0x70, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x37, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, + 0x68, 0x61, 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x50, + 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, + 0x22, 0x2f, 0x0a, 0x13, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c, + 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x49, + 0x44, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, + 0x73, 0x22, 0x4d, 0x0a, 0x14, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x46, 0x75, 0x6c, + 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x35, 0x0a, 0x05, 0x75, 0x73, 0x65, + 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, + 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x55, 0x73, 0x65, + 0x72, 0x46, 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, + 0x22, 0x92, 0x01, 0x0a, 0x15, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, 0x46, + 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x6b, 0x65, + 0x79, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b, 0x65, 0x79, + 0x77, 0x6f, 0x72, 0x64, 0x12, 0x45, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, + 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x67, + 0x65, 0x6e, 0x64, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x05, 0x52, 0x07, 0x67, 0x65, + 0x6e, 0x64, 0x65, 0x72, 0x73, 0x22, 0x65, 0x0a, 0x16, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, + 0x73, 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, + 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, + 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x35, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, + 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x46, 0x75, 0x6c, + 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x22, 0xdb, 0x01, 0x0a, + 0x11, 0x53, 0x65, 0x6e, 0x64, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x52, + 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x64, 0x46, 0x6f, 0x72, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x07, 0x75, 0x73, 0x65, 0x64, 0x46, 0x6f, 0x72, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x12, 0x26, 0x0a, 0x0e, + 0x69, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x44, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x44, + 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x1a, 0x0a, 0x08, + 0x61, 0x72, 0x65, 0x61, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x61, 0x72, 0x65, 0x61, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x68, 0x6f, 0x6e, + 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, + 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x14, 0x0a, 0x12, 0x53, 0x65, + 0x6e, 0x64, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x22, 0x6d, 0x0a, 0x0d, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, + 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x72, 0x65, 0x61, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x72, 0x65, 0x61, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x20, 0x0a, + 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, + 0x1e, 0x0a, 0x0a, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0a, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x22, + 0x10, 0x0a, 0x0e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x22, 0x98, 0x02, 0x0a, 0x10, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x55, 0x73, + 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x1a, + 0x0a, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x61, + 0x63, 0x65, 0x55, 0x52, 0x4c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x66, 0x61, 0x63, + 0x65, 0x55, 0x52, 0x4c, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x69, 0x72, 0x74, 0x68, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x05, 0x62, 0x69, 0x72, 0x74, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x67, 0x65, + 0x6e, 0x64, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x67, 0x65, 0x6e, 0x64, + 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x72, 0x65, 0x61, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x72, 0x65, 0x61, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x20, - 0x0a, 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, + 0x0a, 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, - 0x12, 0x1e, 0x0a, 0x0a, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x64, 0x65, - 0x22, 0x10, 0x0a, 0x0e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x22, 0x98, 0x02, 0x0a, 0x10, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x55, - 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, - 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, - 0x1a, 0x0a, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x66, - 0x61, 0x63, 0x65, 0x55, 0x52, 0x4c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x66, 0x61, - 0x63, 0x65, 0x55, 0x52, 0x4c, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x69, 0x72, 0x74, 0x68, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x62, 0x69, 0x72, 0x74, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x67, - 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x67, 0x65, 0x6e, - 0x64, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x72, 0x65, 0x61, 0x43, 0x6f, 0x64, 0x65, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x72, 0x65, 0x61, 0x43, 0x6f, 0x64, 0x65, 0x12, - 0x20, 0x0a, 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, - 0x72, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x0a, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0xf6, 0x01, - 0x0a, 0x0f, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, - 0x71, 0x12, 0x26, 0x0a, 0x0e, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, - 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x69, 0x6e, 0x76, 0x69, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x76, 0x65, 0x72, - 0x69, 0x66, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x76, - 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x70, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x76, - 0x69, 0x63, 0x65, 0x49, 0x44, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x65, 0x76, - 0x69, 0x63, 0x65, 0x49, 0x44, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, - 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, - 0x6d, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x6f, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x61, 0x75, 0x74, 0x6f, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, - 0x35, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, - 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, - 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, - 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x62, 0x0a, 0x10, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, - 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, - 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, - 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x6d, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x69, 0x6d, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1c, 0x0a, 0x09, - 0x63, 0x68, 0x61, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x63, 0x68, 0x61, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xe6, 0x01, 0x0a, 0x08, 0x4c, - 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x72, 0x65, 0x61, 0x43, - 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x72, 0x65, 0x61, 0x43, - 0x6f, 0x64, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, - 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, - 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, - 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x76, 0x65, 0x72, 0x69, 0x66, - 0x79, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, - 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x70, - 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, - 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x76, 0x69, 0x63, - 0x65, 0x49, 0x44, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x65, 0x76, 0x69, 0x63, - 0x65, 0x49, 0x44, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x02, 0x69, 0x70, 0x22, 0x5b, 0x0a, 0x09, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, - 0x12, 0x18, 0x0a, 0x07, 0x69, 0x6d, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x69, 0x6d, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x68, - 0x61, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, - 0x68, 0x61, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, - 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, - 0x22, 0x8c, 0x01, 0x0a, 0x10, 0x52, 0x65, 0x73, 0x65, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, - 0x72, 0x64, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x72, 0x65, 0x61, 0x43, 0x6f, 0x64, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x72, 0x65, 0x61, 0x43, 0x6f, 0x64, - 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, - 0x62, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x64, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, - 0x6f, 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, - 0x13, 0x0a, 0x11, 0x52, 0x65, 0x73, 0x65, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, - 0x52, 0x65, 0x73, 0x70, 0x22, 0x77, 0x0a, 0x11, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, - 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, + 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0xf6, 0x01, 0x0a, + 0x0f, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, + 0x12, 0x26, 0x0a, 0x0e, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, + 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x76, 0x65, 0x72, 0x69, + 0x66, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x76, 0x65, + 0x72, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x76, 0x69, + 0x63, 0x65, 0x49, 0x44, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x65, 0x76, 0x69, + 0x63, 0x65, 0x49, 0x44, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, + 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x6f, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x09, 0x61, 0x75, 0x74, 0x6f, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x35, + 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x4f, + 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x52, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x62, 0x0a, 0x10, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, + 0x72, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, - 0x44, 0x12, 0x28, 0x0a, 0x0f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x50, 0x61, 0x73, 0x73, - 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x75, 0x72, 0x72, - 0x65, 0x6e, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x6e, - 0x65, 0x77, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0b, 0x6e, 0x65, 0x77, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x14, 0x0a, - 0x12, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, - 0x65, 0x73, 0x70, 0x22, 0x2e, 0x0a, 0x12, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x41, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x75, 0x73, 0x65, - 0x72, 0x49, 0x44, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x75, 0x73, 0x65, 0x72, - 0x49, 0x44, 0x73, 0x22, 0xba, 0x01, 0x0a, 0x13, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x60, 0x0a, 0x0e, 0x75, - 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4d, 0x61, 0x70, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, - 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, 0x75, - 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4d, 0x61, 0x70, 0x1a, 0x41, 0x0a, - 0x13, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4d, 0x61, 0x70, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, - 0x22, 0x30, 0x0a, 0x12, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, - 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x73, 0x22, 0xba, 0x01, 0x0a, 0x13, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x60, 0x0a, 0x0e, 0x61, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x61, 0x70, 0x18, 0x01, 0x20, 0x03, + 0x44, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x6d, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x69, 0x6d, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x63, + 0x68, 0x61, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x63, 0x68, 0x61, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xe6, 0x01, 0x0a, 0x08, 0x4c, 0x6f, + 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x72, 0x65, 0x61, 0x43, 0x6f, + 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x72, 0x65, 0x61, 0x43, 0x6f, + 0x64, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x6f, + 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, + 0x43, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1a, + 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6c, + 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x6c, + 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, + 0x49, 0x44, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, + 0x49, 0x44, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, + 0x69, 0x70, 0x22, 0x5b, 0x0a, 0x09, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, + 0x18, 0x0a, 0x07, 0x69, 0x6d, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x69, 0x6d, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x68, 0x61, + 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x68, + 0x61, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, + 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x22, + 0x8c, 0x01, 0x0a, 0x10, 0x52, 0x65, 0x73, 0x65, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, + 0x64, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x72, 0x65, 0x61, 0x43, 0x6f, 0x64, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x72, 0x65, 0x61, 0x43, 0x6f, 0x64, 0x65, + 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x64, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x6f, + 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x13, + 0x0a, 0x11, 0x52, 0x65, 0x73, 0x65, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, + 0x65, 0x73, 0x70, 0x22, 0x77, 0x0a, 0x11, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, 0x73, + 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, + 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, + 0x12, 0x28, 0x0a, 0x0f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, + 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x75, 0x72, 0x72, 0x65, + 0x6e, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x6e, 0x65, + 0x77, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x6e, 0x65, 0x77, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x14, 0x0a, 0x12, + 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, + 0x73, 0x70, 0x22, 0x2e, 0x0a, 0x12, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, + 0x49, 0x44, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x75, 0x73, 0x65, 0x72, 0x49, + 0x44, 0x73, 0x22, 0xba, 0x01, 0x0a, 0x13, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x60, 0x0a, 0x0e, 0x75, 0x73, + 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4d, 0x61, 0x70, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, - 0x63, 0x68, 0x61, 0x74, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x55, 0x73, 0x65, 0x72, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, 0x61, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x61, 0x70, 0x1a, 0x41, 0x0a, 0x13, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x61, 0x70, 0x45, 0x6e, + 0x63, 0x68, 0x61, 0x74, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, 0x75, 0x73, + 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4d, 0x61, 0x70, 0x1a, 0x41, 0x0a, 0x13, + 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, - 0xdb, 0x03, 0x0a, 0x0c, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, - 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, - 0x6d, 0x65, 0x64, 0x69, 0x61, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x6f, - 0x6f, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x6f, - 0x6f, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, - 0x49, 0x44, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, - 0x49, 0x44, 0x12, 0x26, 0x0a, 0x0e, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x4e, 0x69, 0x63, 0x6b, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x65, 0x6e, 0x64, - 0x65, 0x72, 0x4e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, - 0x63, 0x76, 0x49, 0x44, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x63, 0x76, - 0x49, 0x44, 0x12, 0x22, 0x0a, 0x0c, 0x72, 0x65, 0x63, 0x76, 0x4e, 0x69, 0x63, 0x6b, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x63, 0x76, 0x4e, 0x69, - 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, - 0x44, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, - 0x12, 0x1c, 0x0a, 0x09, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x09, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x4b, - 0x0a, 0x0f, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, - 0x74, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, - 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x55, 0x73, 0x65, 0x72, - 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0f, 0x69, 0x6e, 0x76, 0x69, - 0x74, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x64, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x64, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, - 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, - 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x52, 0x4c, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0b, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x52, 0x4c, 0x22, 0x79, 0x0a, - 0x12, 0x41, 0x64, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, - 0x52, 0x65, 0x71, 0x12, 0x41, 0x0a, 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x63, - 0x6f, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x4f, 0x70, 0x65, 0x6e, - 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x53, 0x69, 0x67, 0x6e, - 0x61, 0x6c, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, - 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x70, 0x65, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22, 0x15, 0x0a, 0x13, 0x41, 0x64, 0x64, 0x53, - 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x22, - 0xf0, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x63, - 0x6f, 0x72, 0x64, 0x73, 0x52, 0x65, 0x71, 0x12, 0x45, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x4f, 0x70, - 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, - 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, - 0x0a, 0x08, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x49, 0x44, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, - 0x63, 0x76, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x63, 0x76, - 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x54, 0x79, 0x70, 0x65, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, - 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x49, 0x44, 0x22, 0x7d, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x52, - 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x20, 0x0a, 0x0b, 0x74, 0x6f, - 0x74, 0x61, 0x6c, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, - 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x43, 0x0a, 0x0d, - 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, - 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x63, 0x6f, - 0x72, 0x64, 0x52, 0x0d, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, - 0x73, 0x22, 0x41, 0x0a, 0x11, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x61, 0x6c, 0x6c, 0x62, - 0x61, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, - 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x62, 0x6f, 0x64, 0x79, 0x22, 0x14, 0x0a, 0x12, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x61, - 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x32, 0xc5, 0x0b, 0x0a, 0x04, 0x63, - 0x68, 0x61, 0x74, 0x12, 0x59, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, - 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x22, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, - 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, - 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x23, 0x2e, 0x4f, 0x70, 0x65, 0x6e, + 0x30, 0x0a, 0x12, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x73, + 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x73, 0x22, 0xba, 0x01, 0x0a, 0x13, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x60, 0x0a, 0x0e, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x61, 0x70, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x38, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, + 0x68, 0x61, 0x74, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, + 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, + 0x73, 0x65, 0x72, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x61, 0x70, 0x1a, 0x41, 0x0a, 0x13, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xdb, + 0x03, 0x0a, 0x0c, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, + 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6d, + 0x65, 0x64, 0x69, 0x61, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x6d, 0x65, 0x64, 0x69, 0x61, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x6f, 0x6f, + 0x6d, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x6f, 0x6f, + 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x49, + 0x44, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x49, + 0x44, 0x12, 0x26, 0x0a, 0x0e, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x4e, 0x69, 0x63, 0x6b, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x65, 0x6e, 0x64, 0x65, + 0x72, 0x4e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x63, + 0x76, 0x49, 0x44, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x63, 0x76, 0x49, + 0x44, 0x12, 0x22, 0x0a, 0x0c, 0x72, 0x65, 0x63, 0x76, 0x4e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x63, 0x76, 0x4e, 0x69, 0x63, + 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x12, + 0x1c, 0x0a, 0x09, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x4b, 0x0a, + 0x0f, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, + 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, + 0x68, 0x61, 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x50, + 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0f, 0x69, 0x6e, 0x76, 0x69, 0x74, + 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x75, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x64, 0x75, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x0d, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x6f, + 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x52, 0x4c, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x52, 0x4c, 0x22, 0x79, 0x0a, 0x12, + 0x41, 0x64, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, + 0x65, 0x71, 0x12, 0x41, 0x0a, 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x63, 0x6f, + 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, + 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, + 0x6c, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x52, + 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22, 0x15, 0x0a, 0x13, 0x41, 0x64, 0x64, 0x53, 0x69, + 0x67, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x22, 0xf0, + 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x63, 0x6f, + 0x72, 0x64, 0x73, 0x52, 0x65, 0x71, 0x12, 0x45, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x4f, 0x70, 0x65, + 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, + 0x08, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x49, 0x44, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x63, + 0x76, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x63, 0x76, 0x49, + 0x44, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x54, 0x79, 0x70, 0x65, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x1e, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, + 0x20, 0x0a, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, + 0x44, 0x22, 0x7d, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x52, 0x65, + 0x63, 0x6f, 0x72, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x20, 0x0a, 0x0b, 0x74, 0x6f, 0x74, + 0x61, 0x6c, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, + 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x43, 0x0a, 0x0d, 0x73, + 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, + 0x63, 0x68, 0x61, 0x74, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x63, 0x6f, 0x72, + 0x64, 0x52, 0x0d, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, + 0x22, 0x41, 0x0a, 0x11, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, + 0x63, 0x6b, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, + 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x62, + 0x6f, 0x64, 0x79, 0x22, 0x14, 0x0a, 0x12, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x61, 0x6c, + 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x22, 0x71, 0x0a, 0x11, 0x47, 0x65, 0x74, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x3a, + 0x0a, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1c, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x22, 0xdf, 0x01, 0x0a, + 0x12, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, + 0x65, 0x73, 0x70, 0x12, 0x3d, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, + 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x12, 0x4d, 0x0a, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, + 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x73, 0x1a, 0x3b, 0x0a, 0x0d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x32, 0xa0, + 0x0c, 0x0a, 0x04, 0x63, 0x68, 0x61, 0x74, 0x12, 0x59, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x22, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x6b, - 0x0a, 0x14, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6c, - 0x69, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x28, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, - 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, - 0x73, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, - 0x1a, 0x29, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, - 0x61, 0x74, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, 0x50, 0x75, 0x62, - 0x6c, 0x69, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x65, 0x0a, 0x12, 0x46, - 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x6e, 0x66, - 0x6f, 0x12, 0x26, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, - 0x68, 0x61, 0x74, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6c, - 0x69, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x27, 0x2e, 0x4f, 0x70, 0x65, 0x6e, - 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x46, 0x69, 0x6e, 0x64, - 0x55, 0x73, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, - 0x73, 0x70, 0x12, 0x65, 0x0a, 0x12, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, - 0x46, 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x26, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, - 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, - 0x68, 0x55, 0x73, 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, - 0x1a, 0x27, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, - 0x61, 0x74, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, 0x46, 0x75, 0x6c, - 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x5f, 0x0a, 0x10, 0x46, 0x69, 0x6e, - 0x64, 0x55, 0x73, 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x24, 0x2e, + 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x23, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, - 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, - 0x52, 0x65, 0x71, 0x1a, 0x25, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, - 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x46, 0x75, - 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x59, 0x0a, 0x0e, 0x53, 0x65, - 0x6e, 0x64, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x22, 0x2e, 0x4f, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, + 0x73, 0x70, 0x12, 0x6b, 0x0a, 0x14, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, + 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x28, 0x2e, 0x4f, 0x70, 0x65, + 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x53, 0x65, 0x61, + 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x6e, 0x66, + 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x29, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, + 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, + 0x72, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, + 0x65, 0x0a, 0x12, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6c, 0x69, + 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x26, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, + 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, + 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x27, 0x2e, + 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, + 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x6e, + 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x65, 0x0a, 0x12, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, + 0x55, 0x73, 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x26, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x53, - 0x65, 0x6e, 0x64, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, - 0x1a, 0x23, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, + 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, + 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x27, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, + 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, + 0x72, 0x46, 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x5f, 0x0a, + 0x10, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, + 0x6f, 0x12, 0x24, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, + 0x68, 0x61, 0x74, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c, + 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x25, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, + 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, + 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x59, + 0x0a, 0x0e, 0x53, 0x65, 0x6e, 0x64, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x64, 0x65, + 0x12, 0x22, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x64, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4d, 0x0a, 0x0a, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, - 0x6f, 0x64, 0x65, 0x12, 0x1e, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, - 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x64, 0x65, - 0x52, 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, - 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x64, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x12, 0x53, 0x0a, 0x0c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, - 0x55, 0x73, 0x65, 0x72, 0x12, 0x20, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, - 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x55, - 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x21, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, - 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, - 0x72, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3e, 0x0a, 0x05, 0x4c, 0x6f, 0x67, - 0x69, 0x6e, 0x12, 0x19, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, - 0x63, 0x68, 0x61, 0x74, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x1a, 0x2e, - 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, - 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x56, 0x0a, 0x0d, 0x52, 0x65, 0x73, - 0x65, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x21, 0x2e, 0x4f, 0x70, 0x65, - 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x52, 0x65, 0x73, - 0x65, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x22, 0x2e, - 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, - 0x52, 0x65, 0x73, 0x65, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, - 0x70, 0x12, 0x59, 0x0a, 0x0e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, - 0x6f, 0x72, 0x64, 0x12, 0x22, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, - 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, 0x73, 0x73, - 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x23, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, + 0x65, 0x52, 0x65, 0x71, 0x1a, 0x23, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, + 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x56, 0x65, 0x72, 0x69, 0x66, + 0x79, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4d, 0x0a, 0x0a, 0x56, 0x65, 0x72, + 0x69, 0x66, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1e, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, + 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, + 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, + 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, + 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x53, 0x0a, 0x0c, 0x52, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x12, 0x20, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, + 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x21, 0x2e, 0x4f, 0x70, 0x65, + 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x52, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3e, 0x0a, + 0x05, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x19, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, + 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, + 0x71, 0x1a, 0x1a, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, + 0x68, 0x61, 0x74, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x56, 0x0a, + 0x0d, 0x52, 0x65, 0x73, 0x65, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x21, + 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, + 0x2e, 0x52, 0x65, 0x73, 0x65, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, + 0x71, 0x1a, 0x22, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, + 0x68, 0x61, 0x74, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, + 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x59, 0x0a, 0x0e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, + 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x22, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, - 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x5c, 0x0a, 0x0f, - 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, + 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x23, 0x2e, 0x4f, 0x70, + 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x43, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, + 0x12, 0x5c, 0x0a, 0x0f, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x12, 0x23, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, + 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x24, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, + 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x55, + 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x5c, + 0x0a, 0x0f, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x73, 0x65, + 0x72, 0x12, 0x23, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, + 0x68, 0x61, 0x74, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, + 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x24, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, + 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x5c, 0x0a, 0x0f, + 0x41, 0x64, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x23, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, - 0x74, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x52, 0x65, 0x71, 0x1a, 0x24, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, - 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x41, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x5c, 0x0a, 0x0f, 0x46, 0x69, - 0x6e, 0x64, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x12, 0x23, 0x2e, - 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, - 0x46, 0x69, 0x6e, 0x64, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, - 0x65, 0x71, 0x1a, 0x24, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, - 0x63, 0x68, 0x61, 0x74, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x5c, 0x0a, 0x0f, 0x41, 0x64, 0x64, 0x53, - 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x23, 0x2e, 0x4f, 0x70, - 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x41, 0x64, - 0x64, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, - 0x1a, 0x24, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, - 0x61, 0x74, 0x2e, 0x41, 0x64, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x63, 0x6f, - 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x5f, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x53, 0x69, 0x67, - 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x12, 0x24, 0x2e, 0x4f, 0x70, 0x65, - 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x47, 0x65, 0x74, - 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x52, 0x65, 0x71, - 0x1a, 0x25, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, - 0x61, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x63, 0x6f, - 0x72, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x59, 0x0a, 0x0e, 0x4f, 0x70, 0x65, 0x6e, 0x49, - 0x4d, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x12, 0x22, 0x2e, 0x4f, 0x70, 0x65, 0x6e, - 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x4f, 0x70, 0x65, 0x6e, - 0x49, 0x4d, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x1a, 0x23, 0x2e, + 0x74, 0x2e, 0x41, 0x64, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x63, 0x6f, 0x72, + 0x64, 0x52, 0x65, 0x71, 0x1a, 0x24, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, + 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x41, 0x64, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, + 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x5f, 0x0a, 0x10, 0x47, 0x65, + 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x12, 0x24, + 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, + 0x2e, 0x47, 0x65, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, + 0x73, 0x52, 0x65, 0x71, 0x1a, 0x25, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, + 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, + 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x59, 0x0a, 0x0e, 0x4f, + 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x12, 0x22, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x52, 0x65, - 0x73, 0x70, 0x42, 0x2a, 0x5a, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x44, 0x4b, 0x2f, 0x63, 0x68, 0x61, 0x74, 0x2f, - 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x68, 0x61, 0x74, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x71, 0x1a, 0x23, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, + 0x68, 0x61, 0x74, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, + 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x12, 0x59, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x12, 0x22, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, + 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x23, 0x2e, 0x4f, + 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x47, + 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, + 0x70, 0x42, 0x2a, 0x5a, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x44, 0x4b, 0x2f, 0x63, 0x68, 0x61, 0x74, 0x2f, 0x70, + 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x68, 0x61, 0x74, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2704,7 +2868,7 @@ func file_chat_chat_proto_rawDescGZIP() []byte { return file_chat_chat_proto_rawDescData } -var file_chat_chat_proto_msgTypes = make([]protoimpl.MessageInfo, 37) +var file_chat_chat_proto_msgTypes = make([]protoimpl.MessageInfo, 40) var file_chat_chat_proto_goTypes = []interface{}{ (*UserIdentity)(nil), // 0: OpenIMChat.chat.UserIdentity (*UpdateUserInfoReq)(nil), // 1: OpenIMChat.chat.UpdateUserInfoReq @@ -2741,78 +2905,89 @@ var file_chat_chat_proto_goTypes = []interface{}{ (*GetSignalRecordsResp)(nil), // 32: OpenIMChat.chat.GetSignalRecordsResp (*OpenIMCallbackReq)(nil), // 33: OpenIMChat.chat.OpenIMCallbackReq (*OpenIMCallbackResp)(nil), // 34: OpenIMChat.chat.OpenIMCallbackResp - nil, // 35: OpenIMChat.chat.FindUserAccountResp.UserAccountMapEntry - nil, // 36: OpenIMChat.chat.FindAccountUserResp.AccountUserMapEntry - (*wrapperspb.StringValue)(nil), // 37: OpenIMServer.protobuf.StringValue - (*wrapperspb.Int32Value)(nil), // 38: OpenIMServer.protobuf.Int32Value - (*wrapperspb.Int64Value)(nil), // 39: OpenIMServer.protobuf.Int64Value - (*common.UserPublicInfo)(nil), // 40: OpenIMChat.common.UserPublicInfo - (*sdkws.RequestPagination)(nil), // 41: OpenIMServer.sdkws.RequestPagination - (*common.UserFullInfo)(nil), // 42: OpenIMChat.common.UserFullInfo + (*GetAccountUserReq)(nil), // 35: OpenIMChat.chat.GetAccountUserReq + (*GetAccountUserResp)(nil), // 36: OpenIMChat.chat.GetAccountUserResp + nil, // 37: OpenIMChat.chat.FindUserAccountResp.UserAccountMapEntry + nil, // 38: OpenIMChat.chat.FindAccountUserResp.AccountUserMapEntry + nil, // 39: OpenIMChat.chat.GetAccountUserResp.AccountsEntry + (*wrapperspb.StringValue)(nil), // 40: OpenIMServer.protobuf.StringValue + (*wrapperspb.Int32Value)(nil), // 41: OpenIMServer.protobuf.Int32Value + (*wrapperspb.Int64Value)(nil), // 42: OpenIMServer.protobuf.Int64Value + (*common.UserPublicInfo)(nil), // 43: OpenIMChat.common.UserPublicInfo + (*sdkws.RequestPagination)(nil), // 44: OpenIMServer.sdkws.RequestPagination + (*common.UserFullInfo)(nil), // 45: OpenIMChat.common.UserFullInfo + (*common.Operation)(nil), // 46: OpenIMChat.common.Operation + (*common.CommonResp)(nil), // 47: OpenIMChat.common.CommonResp } var file_chat_chat_proto_depIdxs = []int32{ - 37, // 0: OpenIMChat.chat.UpdateUserInfoReq.account:type_name -> OpenIMServer.protobuf.StringValue - 37, // 1: OpenIMChat.chat.UpdateUserInfoReq.phoneNumber:type_name -> OpenIMServer.protobuf.StringValue - 37, // 2: OpenIMChat.chat.UpdateUserInfoReq.areaCode:type_name -> OpenIMServer.protobuf.StringValue - 37, // 3: OpenIMChat.chat.UpdateUserInfoReq.email:type_name -> OpenIMServer.protobuf.StringValue - 37, // 4: OpenIMChat.chat.UpdateUserInfoReq.nickname:type_name -> OpenIMServer.protobuf.StringValue - 37, // 5: OpenIMChat.chat.UpdateUserInfoReq.faceURL:type_name -> OpenIMServer.protobuf.StringValue - 38, // 6: OpenIMChat.chat.UpdateUserInfoReq.gender:type_name -> OpenIMServer.protobuf.Int32Value - 38, // 7: OpenIMChat.chat.UpdateUserInfoReq.level:type_name -> OpenIMServer.protobuf.Int32Value - 39, // 8: OpenIMChat.chat.UpdateUserInfoReq.birth:type_name -> OpenIMServer.protobuf.Int64Value - 38, // 9: OpenIMChat.chat.UpdateUserInfoReq.allowAddFriend:type_name -> OpenIMServer.protobuf.Int32Value - 38, // 10: OpenIMChat.chat.UpdateUserInfoReq.allowBeep:type_name -> OpenIMServer.protobuf.Int32Value - 38, // 11: OpenIMChat.chat.UpdateUserInfoReq.allowVibration:type_name -> OpenIMServer.protobuf.Int32Value - 40, // 12: OpenIMChat.chat.FindUserPublicInfoResp.users:type_name -> OpenIMChat.common.UserPublicInfo - 41, // 13: OpenIMChat.chat.SearchUserPublicInfoReq.pagination:type_name -> OpenIMServer.sdkws.RequestPagination - 40, // 14: OpenIMChat.chat.SearchUserPublicInfoResp.users:type_name -> OpenIMChat.common.UserPublicInfo - 42, // 15: OpenIMChat.chat.FindUserFullInfoResp.users:type_name -> OpenIMChat.common.UserFullInfo - 41, // 16: OpenIMChat.chat.SearchUserFullInfoReq.pagination:type_name -> OpenIMServer.sdkws.RequestPagination - 42, // 17: OpenIMChat.chat.SearchUserFullInfoResp.users:type_name -> OpenIMChat.common.UserFullInfo - 15, // 18: OpenIMChat.chat.RegisterUserReq.user:type_name -> OpenIMChat.chat.RegisterUserInfo - 35, // 19: OpenIMChat.chat.FindUserAccountResp.userAccountMap:type_name -> OpenIMChat.chat.FindUserAccountResp.UserAccountMapEntry - 36, // 20: OpenIMChat.chat.FindAccountUserResp.accountUserMap:type_name -> OpenIMChat.chat.FindAccountUserResp.AccountUserMapEntry - 40, // 21: OpenIMChat.chat.SignalRecord.inviterUserList:type_name -> OpenIMChat.common.UserPublicInfo - 28, // 22: OpenIMChat.chat.AddSignalRecordReq.signalRecord:type_name -> OpenIMChat.chat.SignalRecord - 41, // 23: OpenIMChat.chat.GetSignalRecordsReq.pagination:type_name -> OpenIMServer.sdkws.RequestPagination - 28, // 24: OpenIMChat.chat.GetSignalRecordsResp.signalRecords:type_name -> OpenIMChat.chat.SignalRecord - 1, // 25: OpenIMChat.chat.chat.UpdateUserInfo:input_type -> OpenIMChat.chat.UpdateUserInfoReq - 5, // 26: OpenIMChat.chat.chat.SearchUserPublicInfo:input_type -> OpenIMChat.chat.SearchUserPublicInfoReq - 3, // 27: OpenIMChat.chat.chat.FindUserPublicInfo:input_type -> OpenIMChat.chat.FindUserPublicInfoReq - 9, // 28: OpenIMChat.chat.chat.SearchUserFullInfo:input_type -> OpenIMChat.chat.SearchUserFullInfoReq - 7, // 29: OpenIMChat.chat.chat.FindUserFullInfo:input_type -> OpenIMChat.chat.FindUserFullInfoReq - 11, // 30: OpenIMChat.chat.chat.SendVerifyCode:input_type -> OpenIMChat.chat.SendVerifyCodeReq - 13, // 31: OpenIMChat.chat.chat.VerifyCode:input_type -> OpenIMChat.chat.VerifyCodeReq - 16, // 32: OpenIMChat.chat.chat.RegisterUser:input_type -> OpenIMChat.chat.RegisterUserReq - 18, // 33: OpenIMChat.chat.chat.Login:input_type -> OpenIMChat.chat.LoginReq - 20, // 34: OpenIMChat.chat.chat.ResetPassword:input_type -> OpenIMChat.chat.ResetPasswordReq - 22, // 35: OpenIMChat.chat.chat.ChangePassword:input_type -> OpenIMChat.chat.ChangePasswordReq - 24, // 36: OpenIMChat.chat.chat.FindUserAccount:input_type -> OpenIMChat.chat.FindUserAccountReq - 26, // 37: OpenIMChat.chat.chat.FindAccountUser:input_type -> OpenIMChat.chat.FindAccountUserReq - 29, // 38: OpenIMChat.chat.chat.AddSignalRecord:input_type -> OpenIMChat.chat.AddSignalRecordReq - 31, // 39: OpenIMChat.chat.chat.GetSignalRecords:input_type -> OpenIMChat.chat.GetSignalRecordsReq - 33, // 40: OpenIMChat.chat.chat.OpenIMCallback:input_type -> OpenIMChat.chat.OpenIMCallbackReq - 2, // 41: OpenIMChat.chat.chat.UpdateUserInfo:output_type -> OpenIMChat.chat.UpdateUserInfoResp - 6, // 42: OpenIMChat.chat.chat.SearchUserPublicInfo:output_type -> OpenIMChat.chat.SearchUserPublicInfoResp - 4, // 43: OpenIMChat.chat.chat.FindUserPublicInfo:output_type -> OpenIMChat.chat.FindUserPublicInfoResp - 10, // 44: OpenIMChat.chat.chat.SearchUserFullInfo:output_type -> OpenIMChat.chat.SearchUserFullInfoResp - 8, // 45: OpenIMChat.chat.chat.FindUserFullInfo:output_type -> OpenIMChat.chat.FindUserFullInfoResp - 12, // 46: OpenIMChat.chat.chat.SendVerifyCode:output_type -> OpenIMChat.chat.SendVerifyCodeResp - 14, // 47: OpenIMChat.chat.chat.VerifyCode:output_type -> OpenIMChat.chat.VerifyCodeResp - 17, // 48: OpenIMChat.chat.chat.RegisterUser:output_type -> OpenIMChat.chat.RegisterUserResp - 19, // 49: OpenIMChat.chat.chat.Login:output_type -> OpenIMChat.chat.LoginResp - 21, // 50: OpenIMChat.chat.chat.ResetPassword:output_type -> OpenIMChat.chat.ResetPasswordResp - 23, // 51: OpenIMChat.chat.chat.ChangePassword:output_type -> OpenIMChat.chat.ChangePasswordResp - 25, // 52: OpenIMChat.chat.chat.FindUserAccount:output_type -> OpenIMChat.chat.FindUserAccountResp - 27, // 53: OpenIMChat.chat.chat.FindAccountUser:output_type -> OpenIMChat.chat.FindAccountUserResp - 30, // 54: OpenIMChat.chat.chat.AddSignalRecord:output_type -> OpenIMChat.chat.AddSignalRecordResp - 32, // 55: OpenIMChat.chat.chat.GetSignalRecords:output_type -> OpenIMChat.chat.GetSignalRecordsResp - 34, // 56: OpenIMChat.chat.chat.OpenIMCallback:output_type -> OpenIMChat.chat.OpenIMCallbackResp - 41, // [41:57] is the sub-list for method output_type - 25, // [25:41] is the sub-list for method input_type - 25, // [25:25] is the sub-list for extension type_name - 25, // [25:25] is the sub-list for extension extendee - 0, // [0:25] is the sub-list for field type_name + 40, // 0: OpenIMChat.chat.UpdateUserInfoReq.account:type_name -> OpenIMServer.protobuf.StringValue + 40, // 1: OpenIMChat.chat.UpdateUserInfoReq.phoneNumber:type_name -> OpenIMServer.protobuf.StringValue + 40, // 2: OpenIMChat.chat.UpdateUserInfoReq.areaCode:type_name -> OpenIMServer.protobuf.StringValue + 40, // 3: OpenIMChat.chat.UpdateUserInfoReq.email:type_name -> OpenIMServer.protobuf.StringValue + 40, // 4: OpenIMChat.chat.UpdateUserInfoReq.nickname:type_name -> OpenIMServer.protobuf.StringValue + 40, // 5: OpenIMChat.chat.UpdateUserInfoReq.faceURL:type_name -> OpenIMServer.protobuf.StringValue + 41, // 6: OpenIMChat.chat.UpdateUserInfoReq.gender:type_name -> OpenIMServer.protobuf.Int32Value + 41, // 7: OpenIMChat.chat.UpdateUserInfoReq.level:type_name -> OpenIMServer.protobuf.Int32Value + 42, // 8: OpenIMChat.chat.UpdateUserInfoReq.birth:type_name -> OpenIMServer.protobuf.Int64Value + 41, // 9: OpenIMChat.chat.UpdateUserInfoReq.allowAddFriend:type_name -> OpenIMServer.protobuf.Int32Value + 41, // 10: OpenIMChat.chat.UpdateUserInfoReq.allowBeep:type_name -> OpenIMServer.protobuf.Int32Value + 41, // 11: OpenIMChat.chat.UpdateUserInfoReq.allowVibration:type_name -> OpenIMServer.protobuf.Int32Value + 41, // 12: OpenIMChat.chat.UpdateUserInfoReq.globalRecvMsgOpt:type_name -> OpenIMServer.protobuf.Int32Value + 43, // 13: OpenIMChat.chat.FindUserPublicInfoResp.users:type_name -> OpenIMChat.common.UserPublicInfo + 44, // 14: OpenIMChat.chat.SearchUserPublicInfoReq.pagination:type_name -> OpenIMServer.sdkws.RequestPagination + 43, // 15: OpenIMChat.chat.SearchUserPublicInfoResp.users:type_name -> OpenIMChat.common.UserPublicInfo + 45, // 16: OpenIMChat.chat.FindUserFullInfoResp.users:type_name -> OpenIMChat.common.UserFullInfo + 44, // 17: OpenIMChat.chat.SearchUserFullInfoReq.pagination:type_name -> OpenIMServer.sdkws.RequestPagination + 45, // 18: OpenIMChat.chat.SearchUserFullInfoResp.users:type_name -> OpenIMChat.common.UserFullInfo + 15, // 19: OpenIMChat.chat.RegisterUserReq.user:type_name -> OpenIMChat.chat.RegisterUserInfo + 37, // 20: OpenIMChat.chat.FindUserAccountResp.userAccountMap:type_name -> OpenIMChat.chat.FindUserAccountResp.UserAccountMapEntry + 38, // 21: OpenIMChat.chat.FindAccountUserResp.accountUserMap:type_name -> OpenIMChat.chat.FindAccountUserResp.AccountUserMapEntry + 43, // 22: OpenIMChat.chat.SignalRecord.inviterUserList:type_name -> OpenIMChat.common.UserPublicInfo + 28, // 23: OpenIMChat.chat.AddSignalRecordReq.signalRecord:type_name -> OpenIMChat.chat.SignalRecord + 44, // 24: OpenIMChat.chat.GetSignalRecordsReq.pagination:type_name -> OpenIMServer.sdkws.RequestPagination + 28, // 25: OpenIMChat.chat.GetSignalRecordsResp.signalRecords:type_name -> OpenIMChat.chat.SignalRecord + 46, // 26: OpenIMChat.chat.GetAccountUserReq.operation:type_name -> OpenIMChat.common.Operation + 47, // 27: OpenIMChat.chat.GetAccountUserResp.commonResp:type_name -> OpenIMChat.common.CommonResp + 39, // 28: OpenIMChat.chat.GetAccountUserResp.accounts:type_name -> OpenIMChat.chat.GetAccountUserResp.AccountsEntry + 1, // 29: OpenIMChat.chat.chat.UpdateUserInfo:input_type -> OpenIMChat.chat.UpdateUserInfoReq + 5, // 30: OpenIMChat.chat.chat.SearchUserPublicInfo:input_type -> OpenIMChat.chat.SearchUserPublicInfoReq + 3, // 31: OpenIMChat.chat.chat.FindUserPublicInfo:input_type -> OpenIMChat.chat.FindUserPublicInfoReq + 9, // 32: OpenIMChat.chat.chat.SearchUserFullInfo:input_type -> OpenIMChat.chat.SearchUserFullInfoReq + 7, // 33: OpenIMChat.chat.chat.FindUserFullInfo:input_type -> OpenIMChat.chat.FindUserFullInfoReq + 11, // 34: OpenIMChat.chat.chat.SendVerifyCode:input_type -> OpenIMChat.chat.SendVerifyCodeReq + 13, // 35: OpenIMChat.chat.chat.VerifyCode:input_type -> OpenIMChat.chat.VerifyCodeReq + 16, // 36: OpenIMChat.chat.chat.RegisterUser:input_type -> OpenIMChat.chat.RegisterUserReq + 18, // 37: OpenIMChat.chat.chat.Login:input_type -> OpenIMChat.chat.LoginReq + 20, // 38: OpenIMChat.chat.chat.ResetPassword:input_type -> OpenIMChat.chat.ResetPasswordReq + 22, // 39: OpenIMChat.chat.chat.ChangePassword:input_type -> OpenIMChat.chat.ChangePasswordReq + 24, // 40: OpenIMChat.chat.chat.FindUserAccount:input_type -> OpenIMChat.chat.FindUserAccountReq + 26, // 41: OpenIMChat.chat.chat.FindAccountUser:input_type -> OpenIMChat.chat.FindAccountUserReq + 29, // 42: OpenIMChat.chat.chat.AddSignalRecord:input_type -> OpenIMChat.chat.AddSignalRecordReq + 31, // 43: OpenIMChat.chat.chat.GetSignalRecords:input_type -> OpenIMChat.chat.GetSignalRecordsReq + 33, // 44: OpenIMChat.chat.chat.OpenIMCallback:input_type -> OpenIMChat.chat.OpenIMCallbackReq + 35, // 45: OpenIMChat.chat.chat.GetAccountUser:input_type -> OpenIMChat.chat.GetAccountUserReq + 2, // 46: OpenIMChat.chat.chat.UpdateUserInfo:output_type -> OpenIMChat.chat.UpdateUserInfoResp + 6, // 47: OpenIMChat.chat.chat.SearchUserPublicInfo:output_type -> OpenIMChat.chat.SearchUserPublicInfoResp + 4, // 48: OpenIMChat.chat.chat.FindUserPublicInfo:output_type -> OpenIMChat.chat.FindUserPublicInfoResp + 10, // 49: OpenIMChat.chat.chat.SearchUserFullInfo:output_type -> OpenIMChat.chat.SearchUserFullInfoResp + 8, // 50: OpenIMChat.chat.chat.FindUserFullInfo:output_type -> OpenIMChat.chat.FindUserFullInfoResp + 12, // 51: OpenIMChat.chat.chat.SendVerifyCode:output_type -> OpenIMChat.chat.SendVerifyCodeResp + 14, // 52: OpenIMChat.chat.chat.VerifyCode:output_type -> OpenIMChat.chat.VerifyCodeResp + 17, // 53: OpenIMChat.chat.chat.RegisterUser:output_type -> OpenIMChat.chat.RegisterUserResp + 19, // 54: OpenIMChat.chat.chat.Login:output_type -> OpenIMChat.chat.LoginResp + 21, // 55: OpenIMChat.chat.chat.ResetPassword:output_type -> OpenIMChat.chat.ResetPasswordResp + 23, // 56: OpenIMChat.chat.chat.ChangePassword:output_type -> OpenIMChat.chat.ChangePasswordResp + 25, // 57: OpenIMChat.chat.chat.FindUserAccount:output_type -> OpenIMChat.chat.FindUserAccountResp + 27, // 58: OpenIMChat.chat.chat.FindAccountUser:output_type -> OpenIMChat.chat.FindAccountUserResp + 30, // 59: OpenIMChat.chat.chat.AddSignalRecord:output_type -> OpenIMChat.chat.AddSignalRecordResp + 32, // 60: OpenIMChat.chat.chat.GetSignalRecords:output_type -> OpenIMChat.chat.GetSignalRecordsResp + 34, // 61: OpenIMChat.chat.chat.OpenIMCallback:output_type -> OpenIMChat.chat.OpenIMCallbackResp + 36, // 62: OpenIMChat.chat.chat.GetAccountUser:output_type -> OpenIMChat.chat.GetAccountUserResp + 46, // [46:63] is the sub-list for method output_type + 29, // [29:46] is the sub-list for method input_type + 29, // [29:29] is the sub-list for extension type_name + 29, // [29:29] is the sub-list for extension extendee + 0, // [0:29] is the sub-list for field type_name } func init() { file_chat_chat_proto_init() } @@ -3241,6 +3416,30 @@ func file_chat_chat_proto_init() { return nil } } + file_chat_chat_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetAccountUserReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_chat_chat_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetAccountUserResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -3248,7 +3447,7 @@ func file_chat_chat_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_chat_chat_proto_rawDesc, NumEnums: 0, - NumMessages: 37, + NumMessages: 40, NumExtensions: 0, NumServices: 1, }, @@ -3293,6 +3492,7 @@ type ChatClient interface { AddSignalRecord(ctx context.Context, in *AddSignalRecordReq, opts ...grpc.CallOption) (*AddSignalRecordResp, error) GetSignalRecords(ctx context.Context, in *GetSignalRecordsReq, opts ...grpc.CallOption) (*GetSignalRecordsResp, error) OpenIMCallback(ctx context.Context, in *OpenIMCallbackReq, opts ...grpc.CallOption) (*OpenIMCallbackResp, error) + GetAccountUser(ctx context.Context, in *GetAccountUserReq, opts ...grpc.CallOption) (*GetAccountUserResp, error) } type chatClient struct { @@ -3447,6 +3647,15 @@ func (c *chatClient) OpenIMCallback(ctx context.Context, in *OpenIMCallbackReq, return out, nil } +func (c *chatClient) GetAccountUser(ctx context.Context, in *GetAccountUserReq, opts ...grpc.CallOption) (*GetAccountUserResp, error) { + out := new(GetAccountUserResp) + err := c.cc.Invoke(ctx, "/OpenIMChat.chat.chat/GetAccountUser", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // ChatServer is the server API for Chat service. type ChatServer interface { // 编辑个人资料 自己或者管理员调用 @@ -3468,6 +3677,7 @@ type ChatServer interface { AddSignalRecord(context.Context, *AddSignalRecordReq) (*AddSignalRecordResp, error) GetSignalRecords(context.Context, *GetSignalRecordsReq) (*GetSignalRecordsResp, error) OpenIMCallback(context.Context, *OpenIMCallbackReq) (*OpenIMCallbackResp, error) + GetAccountUser(context.Context, *GetAccountUserReq) (*GetAccountUserResp, error) } // UnimplementedChatServer can be embedded to have forward compatible implementations. @@ -3522,6 +3732,9 @@ func (*UnimplementedChatServer) GetSignalRecords(context.Context, *GetSignalReco func (*UnimplementedChatServer) OpenIMCallback(context.Context, *OpenIMCallbackReq) (*OpenIMCallbackResp, error) { return nil, status.Errorf(codes.Unimplemented, "method OpenIMCallback not implemented") } +func (*UnimplementedChatServer) GetAccountUser(context.Context, *GetAccountUserReq) (*GetAccountUserResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAccountUser not implemented") +} func RegisterChatServer(s *grpc.Server, srv ChatServer) { s.RegisterService(&_Chat_serviceDesc, srv) @@ -3815,6 +4028,24 @@ func _Chat_OpenIMCallback_Handler(srv interface{}, ctx context.Context, dec func return interceptor(ctx, in, info, handler) } +func _Chat_GetAccountUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAccountUserReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ChatServer).GetAccountUser(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/OpenIMChat.chat.chat/GetAccountUser", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ChatServer).GetAccountUser(ctx, req.(*GetAccountUserReq)) + } + return interceptor(ctx, in, info, handler) +} + var _Chat_serviceDesc = grpc.ServiceDesc{ ServiceName: "OpenIMChat.chat.chat", HandlerType: (*ChatServer)(nil), @@ -3883,6 +4114,10 @@ var _Chat_serviceDesc = grpc.ServiceDesc{ MethodName: "OpenIMCallback", Handler: _Chat_OpenIMCallback_Handler, }, + { + MethodName: "GetAccountUser", + Handler: _Chat_GetAccountUser_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "chat/chat.proto", diff --git a/pkg/proto/chat/chat.proto b/pkg/proto/chat/chat.proto index c2db5fc03..1c8231aa8 100644 --- a/pkg/proto/chat/chat.proto +++ b/pkg/proto/chat/chat.proto @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + syntax = "proto3"; package OpenIMChat.chat; import "pub/wrapperspb.proto"; @@ -29,6 +43,7 @@ message UpdateUserInfoReq{ OpenIMServer.protobuf.Int32Value allowAddFriend = 11; OpenIMServer.protobuf.Int32Value allowBeep = 12; OpenIMServer.protobuf.Int32Value allowVibration = 13; + OpenIMServer.protobuf.Int32Value globalRecvMsgOpt = 14; } message UpdateUserInfoResp{ @@ -225,6 +240,17 @@ message OpenIMCallbackResp { } + +message GetAccountUserReq { + common.Operation operation = 1; + repeated string accountList = 2; +} + +message GetAccountUserResp { + common.CommonResp commonResp = 1; + map accounts = 2; // account userID +} + service chat { //编辑个人资料 自己或者管理员调用 rpc UpdateUserInfo(UpdateUserInfoReq) returns(UpdateUserInfoResp); @@ -249,4 +275,6 @@ service chat { rpc GetSignalRecords(GetSignalRecordsReq) returns(GetSignalRecordsResp); rpc OpenIMCallback(OpenIMCallbackReq) returns(OpenIMCallbackResp); + + rpc GetAccountUser(GetAccountUserReq) returns(GetAccountUserResp); } \ No newline at end of file diff --git a/pkg/proto/common/common.pb.go b/pkg/proto/common/common.pb.go index f33b48153..f897f142e 100644 --- a/pkg/proto/common/common.pb.go +++ b/pkg/proto/common/common.pb.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.29.1 @@ -25,20 +39,21 @@ type UserFullInfo struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"` - Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password"` - Account string `protobuf:"bytes,3,opt,name=account,proto3" json:"account"` - PhoneNumber string `protobuf:"bytes,4,opt,name=phoneNumber,proto3" json:"phoneNumber"` - AreaCode string `protobuf:"bytes,5,opt,name=areaCode,proto3" json:"areaCode"` - Email string `protobuf:"bytes,6,opt,name=email,proto3" json:"email"` - Nickname string `protobuf:"bytes,7,opt,name=nickname,proto3" json:"nickname"` - FaceURL string `protobuf:"bytes,8,opt,name=faceURL,proto3" json:"faceURL"` - Gender int32 `protobuf:"varint,9,opt,name=gender,proto3" json:"gender"` - Level int32 `protobuf:"varint,10,opt,name=level,proto3" json:"level"` - Birth int64 `protobuf:"varint,11,opt,name=birth,proto3" json:"birth"` - AllowAddFriend int32 `protobuf:"varint,12,opt,name=allowAddFriend,proto3" json:"allowAddFriend"` - AllowBeep int32 `protobuf:"varint,13,opt,name=allowBeep,proto3" json:"allowBeep"` - AllowVibration int32 `protobuf:"varint,14,opt,name=allowVibration,proto3" json:"allowVibration"` + UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"` + Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password"` + Account string `protobuf:"bytes,3,opt,name=account,proto3" json:"account"` + PhoneNumber string `protobuf:"bytes,4,opt,name=phoneNumber,proto3" json:"phoneNumber"` + AreaCode string `protobuf:"bytes,5,opt,name=areaCode,proto3" json:"areaCode"` + Email string `protobuf:"bytes,6,opt,name=email,proto3" json:"email"` + Nickname string `protobuf:"bytes,7,opt,name=nickname,proto3" json:"nickname"` + FaceURL string `protobuf:"bytes,8,opt,name=faceURL,proto3" json:"faceURL"` + Gender int32 `protobuf:"varint,9,opt,name=gender,proto3" json:"gender"` + Level int32 `protobuf:"varint,10,opt,name=level,proto3" json:"level"` + Birth int64 `protobuf:"varint,11,opt,name=birth,proto3" json:"birth"` + AllowAddFriend int32 `protobuf:"varint,12,opt,name=allowAddFriend,proto3" json:"allowAddFriend"` + AllowBeep int32 `protobuf:"varint,13,opt,name=allowBeep,proto3" json:"allowBeep"` + AllowVibration int32 `protobuf:"varint,14,opt,name=allowVibration,proto3" json:"allowVibration"` + GlobalRecvMsgOpt int32 `protobuf:"varint,15,opt,name=globalRecvMsgOpt,proto3" json:"globalRecvMsgOpt"` } func (x *UserFullInfo) Reset() { @@ -171,6 +186,13 @@ func (x *UserFullInfo) GetAllowVibration() int32 { return 0 } +func (x *UserFullInfo) GetGlobalRecvMsgOpt() int32 { + if x != nil { + return x.GlobalRecvMsgOpt + } + return 0 +} + type UserPublicInfo struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -277,6 +299,7 @@ type UserIdentity struct { DeviceID string `protobuf:"bytes,4,opt,name=deviceID,proto3" json:"deviceID"` Platform int32 `protobuf:"varint,5,opt,name=platform,proto3" json:"platform"` Account string `protobuf:"bytes,6,opt,name=account,proto3" json:"account"` + Password string `protobuf:"bytes,7,opt,name=password,proto3" json:"password"` } func (x *UserIdentity) Reset() { @@ -353,6 +376,13 @@ func (x *UserIdentity) GetAccount() string { return "" } +func (x *UserIdentity) GetPassword() string { + if x != nil { + return x.Password + } + return "" +} + type AppletInfo struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -480,154 +510,1122 @@ func (x *AppletInfo) GetCreateTime() int64 { return 0 } -var File_common_common_proto protoreflect.FileDescriptor +type Department struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -var file_common_common_proto_rawDesc = []byte{ - 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, - 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x22, 0x98, 0x03, 0x0a, 0x0c, 0x55, 0x73, 0x65, - 0x72, 0x46, 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, - 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, - 0x44, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x18, 0x0a, - 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, - 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x68, - 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x72, 0x65, - 0x61, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x72, 0x65, - 0x61, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x6e, - 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, - 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x61, 0x63, 0x65, 0x55, - 0x52, 0x4c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x66, 0x61, 0x63, 0x65, 0x55, 0x52, - 0x4c, 0x12, 0x16, 0x0a, 0x06, 0x67, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x06, 0x67, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76, - 0x65, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, - 0x14, 0x0a, 0x05, 0x62, 0x69, 0x72, 0x74, 0x68, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, - 0x62, 0x69, 0x72, 0x74, 0x68, 0x12, 0x26, 0x0a, 0x0e, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x41, 0x64, - 0x64, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x61, - 0x6c, 0x6c, 0x6f, 0x77, 0x41, 0x64, 0x64, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x12, 0x1c, 0x0a, - 0x09, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x42, 0x65, 0x65, 0x70, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x09, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x42, 0x65, 0x65, 0x70, 0x12, 0x26, 0x0a, 0x0e, 0x61, - 0x6c, 0x6c, 0x6f, 0x77, 0x56, 0x69, 0x62, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0e, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x0e, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x56, 0x69, 0x62, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x22, 0xbc, 0x01, 0x0a, 0x0e, 0x55, 0x73, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6c, - 0x69, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x18, - 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, - 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x1a, - 0x0a, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x61, - 0x63, 0x65, 0x55, 0x52, 0x4c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x66, 0x61, 0x63, - 0x65, 0x55, 0x52, 0x4c, 0x12, 0x16, 0x0a, 0x06, 0x67, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x67, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, - 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6c, 0x65, 0x76, - 0x65, 0x6c, 0x22, 0xb4, 0x01, 0x0a, 0x0c, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x65, 0x6e, 0x74, - 0x69, 0x74, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x72, 0x65, - 0x61, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x72, 0x65, - 0x61, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, - 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x68, 0x6f, 0x6e, - 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x76, 0x69, 0x63, - 0x65, 0x49, 0x44, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x65, 0x76, 0x69, 0x63, - 0x65, 0x49, 0x44, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, - 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x80, 0x02, 0x0a, 0x0a, 0x41, 0x70, - 0x70, 0x6c, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, - 0x61, 0x70, 0x70, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x70, 0x70, - 0x49, 0x44, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x64, 0x35, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x64, 0x35, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, - 0x7a, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x18, - 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x69, 0x6f, - 0x72, 0x69, 0x74, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x70, 0x72, 0x69, 0x6f, - 0x72, 0x69, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x0a, - 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1e, 0x0a, 0x0a, - 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x42, 0x2c, 0x5a, 0x2a, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4f, 0x70, 0x65, 0x6e, 0x49, - 0x4d, 0x53, 0x44, 0x4b, 0x2f, 0x63, 0x68, 0x61, 0x74, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + DepartmentID string `protobuf:"bytes,1,opt,name=departmentID,proto3" json:"departmentID"` + FaceURL string `protobuf:"bytes,2,opt,name=faceURL,proto3" json:"faceURL"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name"` + ParentID string `protobuf:"bytes,4,opt,name=parentID,proto3" json:"parentID"` + Order int32 `protobuf:"varint,5,opt,name=order,proto3" json:"order"` + DepartmentType int32 `protobuf:"varint,6,opt,name=departmentType,proto3" json:"departmentType"` + RelatedGroupID string `protobuf:"bytes,7,opt,name=relatedGroupID,proto3" json:"relatedGroupID"` + CreateTime int64 `protobuf:"varint,8,opt,name=createTime,proto3" json:"createTime"` + MemberNum uint32 `protobuf:"varint,9,opt,name=memberNum,proto3" json:"memberNum"` + Position string `protobuf:"bytes,10,opt,name=position,proto3" json:"position"` } -var ( - file_common_common_proto_rawDescOnce sync.Once - file_common_common_proto_rawDescData = file_common_common_proto_rawDesc -) +func (x *Department) Reset() { + *x = Department{} + if protoimpl.UnsafeEnabled { + mi := &file_common_common_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} -func file_common_common_proto_rawDescGZIP() []byte { - file_common_common_proto_rawDescOnce.Do(func() { - file_common_common_proto_rawDescData = protoimpl.X.CompressGZIP(file_common_common_proto_rawDescData) - }) - return file_common_common_proto_rawDescData +func (x *Department) String() string { + return protoimpl.X.MessageStringOf(x) } -var file_common_common_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_common_common_proto_goTypes = []interface{}{ - (*UserFullInfo)(nil), // 0: OpenIMChat.common.UserFullInfo - (*UserPublicInfo)(nil), // 1: OpenIMChat.common.UserPublicInfo - (*UserIdentity)(nil), // 2: OpenIMChat.common.UserIdentity - (*AppletInfo)(nil), // 3: OpenIMChat.common.AppletInfo +func (*Department) ProtoMessage() {} + +func (x *Department) ProtoReflect() protoreflect.Message { + mi := &file_common_common_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) } -var file_common_common_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name + +// Deprecated: Use Department.ProtoReflect.Descriptor instead. +func (*Department) Descriptor() ([]byte, []int) { + return file_common_common_proto_rawDescGZIP(), []int{4} } -func init() { file_common_common_proto_init() } -func file_common_common_proto_init() { - if File_common_common_proto != nil { - return +func (x *Department) GetDepartmentID() string { + if x != nil { + return x.DepartmentID } - if !protoimpl.UnsafeEnabled { - file_common_common_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserFullInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_common_common_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserPublicInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } + return "" +} + +func (x *Department) GetFaceURL() string { + if x != nil { + return x.FaceURL + } + return "" +} + +func (x *Department) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Department) GetParentID() string { + if x != nil { + return x.ParentID + } + return "" +} + +func (x *Department) GetOrder() int32 { + if x != nil { + return x.Order + } + return 0 +} + +func (x *Department) GetDepartmentType() int32 { + if x != nil { + return x.DepartmentType + } + return 0 +} + +func (x *Department) GetRelatedGroupID() string { + if x != nil { + return x.RelatedGroupID + } + return "" +} + +func (x *Department) GetCreateTime() int64 { + if x != nil { + return x.CreateTime + } + return 0 +} + +func (x *Department) GetMemberNum() uint32 { + if x != nil { + return x.MemberNum + } + return 0 +} + +func (x *Department) GetPosition() string { + if x != nil { + return x.Position + } + return "" +} + +type CommonResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ErrCode int32 `protobuf:"varint,1,opt,name=errCode,proto3" json:"errCode"` + ErrMsg string `protobuf:"bytes,2,opt,name=errMsg,proto3" json:"errMsg"` +} + +func (x *CommonResp) Reset() { + *x = CommonResp{} + if protoimpl.UnsafeEnabled { + mi := &file_common_common_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CommonResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CommonResp) ProtoMessage() {} + +func (x *CommonResp) ProtoReflect() protoreflect.Message { + mi := &file_common_common_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - file_common_common_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserIdentity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CommonResp.ProtoReflect.Descriptor instead. +func (*CommonResp) Descriptor() ([]byte, []int) { + return file_common_common_proto_rawDescGZIP(), []int{5} +} + +func (x *CommonResp) GetErrCode() int32 { + if x != nil { + return x.ErrCode + } + return 0 +} + +func (x *CommonResp) GetErrMsg() string { + if x != nil { + return x.ErrMsg + } + return "" +} + +type OrganizationUser struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"` + Nickname string `protobuf:"bytes,2,opt,name=nickname,proto3" json:"nickname"` + EnglishName string `protobuf:"bytes,3,opt,name=englishName,proto3" json:"englishName"` + FaceURL string `protobuf:"bytes,4,opt,name=faceURL,proto3" json:"faceURL"` + Gender int32 `protobuf:"varint,5,opt,name=gender,proto3" json:"gender"` + Mobile string `protobuf:"bytes,6,opt,name=mobile,proto3" json:"mobile"` + Telephone string `protobuf:"bytes,7,opt,name=telephone,proto3" json:"telephone"` + Birth int64 `protobuf:"varint,8,opt,name=birth,proto3" json:"birth"` + Email string `protobuf:"bytes,9,opt,name=email,proto3" json:"email"` + Order int32 `protobuf:"varint,10,opt,name=order,proto3" json:"order"` + Status int32 `protobuf:"varint,11,opt,name=status,proto3" json:"status"` + CreateTime int64 `protobuf:"varint,12,opt,name=createTime,proto3" json:"createTime"` + Ex string `protobuf:"bytes,13,opt,name=ex,proto3" json:"ex"` + DepartmentMemberList []*DepartmentMember `protobuf:"bytes,14,rep,name=departmentMemberList,proto3" json:"departmentMemberList"` + Station string `protobuf:"bytes,15,opt,name=station,proto3" json:"station"` + AreaCode string `protobuf:"bytes,16,opt,name=areaCode,proto3" json:"areaCode"` +} + +func (x *OrganizationUser) Reset() { + *x = OrganizationUser{} + if protoimpl.UnsafeEnabled { + mi := &file_common_common_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OrganizationUser) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OrganizationUser) ProtoMessage() {} + +func (x *OrganizationUser) ProtoReflect() protoreflect.Message { + mi := &file_common_common_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - file_common_common_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AppletInfo); i { + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OrganizationUser.ProtoReflect.Descriptor instead. +func (*OrganizationUser) Descriptor() ([]byte, []int) { + return file_common_common_proto_rawDescGZIP(), []int{6} +} + +func (x *OrganizationUser) GetUserID() string { + if x != nil { + return x.UserID + } + return "" +} + +func (x *OrganizationUser) GetNickname() string { + if x != nil { + return x.Nickname + } + return "" +} + +func (x *OrganizationUser) GetEnglishName() string { + if x != nil { + return x.EnglishName + } + return "" +} + +func (x *OrganizationUser) GetFaceURL() string { + if x != nil { + return x.FaceURL + } + return "" +} + +func (x *OrganizationUser) GetGender() int32 { + if x != nil { + return x.Gender + } + return 0 +} + +func (x *OrganizationUser) GetMobile() string { + if x != nil { + return x.Mobile + } + return "" +} + +func (x *OrganizationUser) GetTelephone() string { + if x != nil { + return x.Telephone + } + return "" +} + +func (x *OrganizationUser) GetBirth() int64 { + if x != nil { + return x.Birth + } + return 0 +} + +func (x *OrganizationUser) GetEmail() string { + if x != nil { + return x.Email + } + return "" +} + +func (x *OrganizationUser) GetOrder() int32 { + if x != nil { + return x.Order + } + return 0 +} + +func (x *OrganizationUser) GetStatus() int32 { + if x != nil { + return x.Status + } + return 0 +} + +func (x *OrganizationUser) GetCreateTime() int64 { + if x != nil { + return x.CreateTime + } + return 0 +} + +func (x *OrganizationUser) GetEx() string { + if x != nil { + return x.Ex + } + return "" +} + +func (x *OrganizationUser) GetDepartmentMemberList() []*DepartmentMember { + if x != nil { + return x.DepartmentMemberList + } + return nil +} + +func (x *OrganizationUser) GetStation() string { + if x != nil { + return x.Station + } + return "" +} + +func (x *OrganizationUser) GetAreaCode() string { + if x != nil { + return x.AreaCode + } + return "" +} + +type DepartmentMember struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"` + DepartmentID string `protobuf:"bytes,2,opt,name=departmentID,proto3" json:"departmentID"` + Order int32 `protobuf:"varint,3,opt,name=order,proto3" json:"order"` + Position string `protobuf:"bytes,4,opt,name=position,proto3" json:"position"` + Leader int32 `protobuf:"varint,5,opt,name=leader,proto3" json:"leader"` + Status int32 `protobuf:"varint,6,opt,name=status,proto3" json:"status"` + Ex string `protobuf:"bytes,7,opt,name=ex,proto3" json:"ex"` + EntryTime int64 `protobuf:"varint,8,opt,name=entryTime,proto3" json:"entryTime"` + TerminationTime int64 `protobuf:"varint,9,opt,name=terminationTime,proto3" json:"terminationTime"` + CreateTime int64 `protobuf:"varint,10,opt,name=createTime,proto3" json:"createTime"` + Department *Department `protobuf:"bytes,11,opt,name=department,proto3" json:"department"` + OrganizationUser *OrganizationUser `protobuf:"bytes,12,opt,name=organizationUser,proto3" json:"organizationUser"` +} + +func (x *DepartmentMember) Reset() { + *x = DepartmentMember{} + if protoimpl.UnsafeEnabled { + mi := &file_common_common_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DepartmentMember) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DepartmentMember) ProtoMessage() {} + +func (x *DepartmentMember) ProtoReflect() protoreflect.Message { + mi := &file_common_common_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 DepartmentMember.ProtoReflect.Descriptor instead. +func (*DepartmentMember) Descriptor() ([]byte, []int) { + return file_common_common_proto_rawDescGZIP(), []int{7} +} + +func (x *DepartmentMember) GetUserID() string { + if x != nil { + return x.UserID + } + return "" +} + +func (x *DepartmentMember) GetDepartmentID() string { + if x != nil { + return x.DepartmentID + } + return "" +} + +func (x *DepartmentMember) GetOrder() int32 { + if x != nil { + return x.Order + } + return 0 +} + +func (x *DepartmentMember) GetPosition() string { + if x != nil { + return x.Position + } + return "" +} + +func (x *DepartmentMember) GetLeader() int32 { + if x != nil { + return x.Leader + } + return 0 +} + +func (x *DepartmentMember) GetStatus() int32 { + if x != nil { + return x.Status + } + return 0 +} + +func (x *DepartmentMember) GetEx() string { + if x != nil { + return x.Ex + } + return "" +} + +func (x *DepartmentMember) GetEntryTime() int64 { + if x != nil { + return x.EntryTime + } + return 0 +} + +func (x *DepartmentMember) GetTerminationTime() int64 { + if x != nil { + return x.TerminationTime + } + return 0 +} + +func (x *DepartmentMember) GetCreateTime() int64 { + if x != nil { + return x.CreateTime + } + return 0 +} + +func (x *DepartmentMember) GetDepartment() *Department { + if x != nil { + return x.Department + } + return nil +} + +func (x *DepartmentMember) GetOrganizationUser() *OrganizationUser { + if x != nil { + return x.OrganizationUser + } + return nil +} + +type UserInDepartment struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + OrganizationUser *OrganizationUser `protobuf:"bytes,1,opt,name=organizationUser,proto3" json:"organizationUser"` + DepartmentMemberList []*DepartmentMember `protobuf:"bytes,2,rep,name=departmentMemberList,proto3" json:"departmentMemberList"` +} + +func (x *UserInDepartment) Reset() { + *x = UserInDepartment{} + if protoimpl.UnsafeEnabled { + mi := &file_common_common_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UserInDepartment) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UserInDepartment) ProtoMessage() {} + +func (x *UserInDepartment) ProtoReflect() protoreflect.Message { + mi := &file_common_common_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UserInDepartment.ProtoReflect.Descriptor instead. +func (*UserInDepartment) Descriptor() ([]byte, []int) { + return file_common_common_proto_rawDescGZIP(), []int{8} +} + +func (x *UserInDepartment) GetOrganizationUser() *OrganizationUser { + if x != nil { + return x.OrganizationUser + } + return nil +} + +func (x *UserInDepartment) GetDepartmentMemberList() []*DepartmentMember { + if x != nil { + return x.DepartmentMemberList + } + return nil +} + +type Organization struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + LogoURL string `protobuf:"bytes,1,opt,name=logoURL,proto3" json:"logoURL"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name"` + Homepage string `protobuf:"bytes,3,opt,name=homepage,proto3" json:"homepage"` + RelatedGroupID string `protobuf:"bytes,4,opt,name=relatedGroupID,proto3" json:"relatedGroupID"` + Introduction string `protobuf:"bytes,5,opt,name=introduction,proto3" json:"introduction"` + CreateTime int64 `protobuf:"varint,6,opt,name=createTime,proto3" json:"createTime"` + DefaultPassword int64 `protobuf:"varint,7,opt,name=defaultPassword,proto3" json:"defaultPassword"` +} + +func (x *Organization) Reset() { + *x = Organization{} + if protoimpl.UnsafeEnabled { + mi := &file_common_common_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Organization) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Organization) ProtoMessage() {} + +func (x *Organization) ProtoReflect() protoreflect.Message { + mi := &file_common_common_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Organization.ProtoReflect.Descriptor instead. +func (*Organization) Descriptor() ([]byte, []int) { + return file_common_common_proto_rawDescGZIP(), []int{9} +} + +func (x *Organization) GetLogoURL() string { + if x != nil { + return x.LogoURL + } + return "" +} + +func (x *Organization) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Organization) GetHomepage() string { + if x != nil { + return x.Homepage + } + return "" +} + +func (x *Organization) GetRelatedGroupID() string { + if x != nil { + return x.RelatedGroupID + } + return "" +} + +func (x *Organization) GetIntroduction() string { + if x != nil { + return x.Introduction + } + return "" +} + +func (x *Organization) GetCreateTime() int64 { + if x != nil { + return x.CreateTime + } + return 0 +} + +func (x *Organization) GetDefaultPassword() int64 { + if x != nil { + return x.DefaultPassword + } + return 0 +} + +type RequestPagination struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PageNumber int32 `protobuf:"varint,1,opt,name=pageNumber,proto3" json:"pageNumber"` + ShowNumber int32 `protobuf:"varint,2,opt,name=showNumber,proto3" json:"showNumber"` +} + +func (x *RequestPagination) Reset() { + *x = RequestPagination{} + if protoimpl.UnsafeEnabled { + mi := &file_common_common_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RequestPagination) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RequestPagination) ProtoMessage() {} + +func (x *RequestPagination) ProtoReflect() protoreflect.Message { + mi := &file_common_common_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RequestPagination.ProtoReflect.Descriptor instead. +func (*RequestPagination) Descriptor() ([]byte, []int) { + return file_common_common_proto_rawDescGZIP(), []int{10} +} + +func (x *RequestPagination) GetPageNumber() int32 { + if x != nil { + return x.PageNumber + } + return 0 +} + +func (x *RequestPagination) GetShowNumber() int32 { + if x != nil { + return x.ShowNumber + } + return 0 +} + +type Operation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + OpUserID string `protobuf:"bytes,1,opt,name=opUserID,proto3" json:"opUserID"` + OperationID string `protobuf:"bytes,2,opt,name=operationID,proto3" json:"operationID"` +} + +func (x *Operation) Reset() { + *x = Operation{} + if protoimpl.UnsafeEnabled { + mi := &file_common_common_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Operation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Operation) ProtoMessage() {} + +func (x *Operation) ProtoReflect() protoreflect.Message { + mi := &file_common_common_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Operation.ProtoReflect.Descriptor instead. +func (*Operation) Descriptor() ([]byte, []int) { + return file_common_common_proto_rawDescGZIP(), []int{11} +} + +func (x *Operation) GetOpUserID() string { + if x != nil { + return x.OpUserID + } + return "" +} + +func (x *Operation) GetOperationID() string { + if x != nil { + return x.OperationID + } + return "" +} + +var File_common_common_proto protoreflect.FileDescriptor + +var file_common_common_proto_rawDesc = []byte{ + 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, + 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x22, 0xc4, 0x03, 0x0a, 0x0c, 0x55, 0x73, 0x65, + 0x72, 0x46, 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, + 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, + 0x44, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x18, 0x0a, + 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, + 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x68, + 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x72, 0x65, + 0x61, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x72, 0x65, + 0x61, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x6e, + 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, + 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x61, 0x63, 0x65, 0x55, + 0x52, 0x4c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x66, 0x61, 0x63, 0x65, 0x55, 0x52, + 0x4c, 0x12, 0x16, 0x0a, 0x06, 0x67, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x06, 0x67, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76, + 0x65, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, + 0x14, 0x0a, 0x05, 0x62, 0x69, 0x72, 0x74, 0x68, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, + 0x62, 0x69, 0x72, 0x74, 0x68, 0x12, 0x26, 0x0a, 0x0e, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x41, 0x64, + 0x64, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x61, + 0x6c, 0x6c, 0x6f, 0x77, 0x41, 0x64, 0x64, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x12, 0x1c, 0x0a, + 0x09, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x42, 0x65, 0x65, 0x70, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x09, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x42, 0x65, 0x65, 0x70, 0x12, 0x26, 0x0a, 0x0e, 0x61, + 0x6c, 0x6c, 0x6f, 0x77, 0x56, 0x69, 0x62, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0e, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x0e, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x56, 0x69, 0x62, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x10, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x52, 0x65, 0x63, + 0x76, 0x4d, 0x73, 0x67, 0x4f, 0x70, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x67, + 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x52, 0x65, 0x63, 0x76, 0x4d, 0x73, 0x67, 0x4f, 0x70, 0x74, 0x22, + 0xbc, 0x01, 0x0a, 0x0e, 0x55, 0x73, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x6e, + 0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x69, + 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x69, + 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x61, 0x63, 0x65, 0x55, 0x52, + 0x4c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x66, 0x61, 0x63, 0x65, 0x55, 0x52, 0x4c, + 0x12, 0x16, 0x0a, 0x06, 0x67, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x06, 0x67, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, + 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x22, 0xd0, + 0x01, 0x0a, 0x0c, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, + 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x72, 0x65, 0x61, 0x43, 0x6f, 0x64, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x72, 0x65, 0x61, 0x43, 0x6f, 0x64, + 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x44, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x44, 0x12, + 0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x18, 0x0a, 0x07, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, + 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, + 0x64, 0x22, 0x80, 0x02, 0x0a, 0x0a, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x70, 0x70, 0x49, 0x44, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x44, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x63, + 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x12, 0x10, + 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, + 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x64, 0x35, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, + 0x64, 0x35, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x09, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, + 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x54, 0x69, 0x6d, 0x65, 0x22, 0xba, 0x02, 0x0a, 0x0a, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, + 0x65, 0x6e, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, + 0x74, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x70, 0x61, 0x72, + 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x61, 0x63, 0x65, 0x55, + 0x52, 0x4c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x66, 0x61, 0x63, 0x65, 0x55, 0x52, + 0x4c, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, + 0x44, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, + 0x44, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x26, 0x0a, 0x0e, 0x64, 0x65, 0x70, 0x61, 0x72, + 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x0e, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x26, 0x0a, 0x0e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, + 0x44, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x65, 0x6d, 0x62, 0x65, + 0x72, 0x4e, 0x75, 0x6d, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x6d, 0x65, 0x6d, 0x62, + 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x22, 0x3e, 0x0a, 0x0a, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, + 0x18, 0x0a, 0x07, 0x65, 0x72, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x07, 0x65, 0x72, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x72, 0x72, + 0x4d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, 0x4d, 0x73, + 0x67, 0x22, 0xe9, 0x03, 0x0a, 0x10, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x1a, + 0x0a, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x65, 0x6e, + 0x67, 0x6c, 0x69, 0x73, 0x68, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x65, 0x6e, 0x67, 0x6c, 0x69, 0x73, 0x68, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, + 0x66, 0x61, 0x63, 0x65, 0x55, 0x52, 0x4c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x66, + 0x61, 0x63, 0x65, 0x55, 0x52, 0x4c, 0x12, 0x16, 0x0a, 0x06, 0x67, 0x65, 0x6e, 0x64, 0x65, 0x72, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x67, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x16, + 0x0a, 0x06, 0x6d, 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x6d, 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x68, + 0x6f, 0x6e, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x65, 0x6c, 0x65, 0x70, + 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x69, 0x72, 0x74, 0x68, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x05, 0x62, 0x69, 0x72, 0x74, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, + 0x61, 0x69, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, + 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1e, + 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x0e, + 0x0a, 0x02, 0x65, 0x78, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x65, 0x78, 0x12, 0x57, + 0x0a, 0x14, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x6d, 0x62, + 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x4f, + 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2e, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, + 0x72, 0x52, 0x14, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x6d, + 0x62, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x72, 0x65, 0x61, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x10, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x72, 0x65, 0x61, 0x43, 0x6f, 0x64, 0x65, 0x22, 0xb8, 0x03, + 0x0a, 0x10, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x6d, 0x62, + 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x22, 0x0a, 0x0c, 0x64, 0x65, + 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0c, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x12, 0x14, + 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6f, + 0x72, 0x64, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x06, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x0e, 0x0a, 0x02, 0x65, 0x78, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x65, 0x78, + 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x28, + 0x0a, 0x0f, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, + 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3d, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x61, + 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x4f, + 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2e, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0a, 0x64, 0x65, 0x70, + 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4f, 0x0a, 0x10, 0x6f, 0x72, 0x67, 0x61, 0x6e, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x18, 0x0c, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x23, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x10, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x22, 0xbc, 0x01, 0x0a, 0x10, 0x55, 0x73, 0x65, + 0x72, 0x49, 0x6e, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4f, 0x0a, + 0x10, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x73, 0x65, + 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, + 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4f, 0x72, 0x67, 0x61, + 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x10, 0x6f, 0x72, + 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x12, 0x57, + 0x0a, 0x14, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x6d, 0x62, + 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x4f, + 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2e, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, + 0x72, 0x52, 0x14, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x6d, + 0x62, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x22, 0xee, 0x01, 0x0a, 0x0c, 0x4f, 0x72, 0x67, 0x61, + 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x6c, 0x6f, 0x67, 0x6f, + 0x55, 0x52, 0x4c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6c, 0x6f, 0x67, 0x6f, 0x55, + 0x52, 0x4c, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x68, 0x6f, 0x6d, 0x65, 0x70, 0x61, + 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x68, 0x6f, 0x6d, 0x65, 0x70, 0x61, + 0x67, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x49, 0x44, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x6c, 0x61, + 0x74, 0x65, 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x12, 0x22, 0x0a, 0x0c, 0x69, 0x6e, + 0x74, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0c, 0x69, 0x6e, 0x74, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1e, + 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x28, + 0x0a, 0x0f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, + 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, + 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x53, 0x0a, 0x11, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, + 0x0a, 0x70, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1e, 0x0a, + 0x0a, 0x73, 0x68, 0x6f, 0x77, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x0a, 0x73, 0x68, 0x6f, 0x77, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x49, 0x0a, + 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x70, + 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x70, + 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x42, 0x2c, 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x44, 0x4b, + 0x2f, 0x63, 0x68, 0x61, 0x74, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_common_common_proto_rawDescOnce sync.Once + file_common_common_proto_rawDescData = file_common_common_proto_rawDesc +) + +func file_common_common_proto_rawDescGZIP() []byte { + file_common_common_proto_rawDescOnce.Do(func() { + file_common_common_proto_rawDescData = protoimpl.X.CompressGZIP(file_common_common_proto_rawDescData) + }) + return file_common_common_proto_rawDescData +} + +var file_common_common_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_common_common_proto_goTypes = []interface{}{ + (*UserFullInfo)(nil), // 0: OpenIMChat.common.UserFullInfo + (*UserPublicInfo)(nil), // 1: OpenIMChat.common.UserPublicInfo + (*UserIdentity)(nil), // 2: OpenIMChat.common.UserIdentity + (*AppletInfo)(nil), // 3: OpenIMChat.common.AppletInfo + (*Department)(nil), // 4: OpenIMChat.common.Department + (*CommonResp)(nil), // 5: OpenIMChat.common.CommonResp + (*OrganizationUser)(nil), // 6: OpenIMChat.common.OrganizationUser + (*DepartmentMember)(nil), // 7: OpenIMChat.common.DepartmentMember + (*UserInDepartment)(nil), // 8: OpenIMChat.common.UserInDepartment + (*Organization)(nil), // 9: OpenIMChat.common.Organization + (*RequestPagination)(nil), // 10: OpenIMChat.common.RequestPagination + (*Operation)(nil), // 11: OpenIMChat.common.Operation +} +var file_common_common_proto_depIdxs = []int32{ + 7, // 0: OpenIMChat.common.OrganizationUser.departmentMemberList:type_name -> OpenIMChat.common.DepartmentMember + 4, // 1: OpenIMChat.common.DepartmentMember.department:type_name -> OpenIMChat.common.Department + 6, // 2: OpenIMChat.common.DepartmentMember.organizationUser:type_name -> OpenIMChat.common.OrganizationUser + 6, // 3: OpenIMChat.common.UserInDepartment.organizationUser:type_name -> OpenIMChat.common.OrganizationUser + 7, // 4: OpenIMChat.common.UserInDepartment.departmentMemberList:type_name -> OpenIMChat.common.DepartmentMember + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_common_common_proto_init() } +func file_common_common_proto_init() { + if File_common_common_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_common_common_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UserFullInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_common_common_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UserPublicInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_common_common_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UserIdentity); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_common_common_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AppletInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_common_common_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Department); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_common_common_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CommonResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_common_common_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OrganizationUser); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_common_common_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DepartmentMember); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_common_common_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UserInDepartment); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_common_common_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Organization); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_common_common_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RequestPagination); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_common_common_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Operation); i { case 0: return &v.state case 1: @@ -645,7 +1643,7 @@ func file_common_common_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_common_common_proto_rawDesc, NumEnums: 0, - NumMessages: 4, + NumMessages: 12, NumExtensions: 0, NumServices: 0, }, diff --git a/pkg/proto/common/common.proto b/pkg/proto/common/common.proto index fd7bed757..e75566b31 100644 --- a/pkg/proto/common/common.proto +++ b/pkg/proto/common/common.proto @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + syntax = "proto3"; package OpenIMChat.common; option go_package = "github.com/OpenIMSDK/chat/pkg/proto/common"; @@ -18,6 +32,7 @@ message UserFullInfo{ int32 allowAddFriend = 12; int32 allowBeep = 13; int32 allowVibration = 14; + int32 globalRecvMsgOpt = 15; } message UserPublicInfo{ @@ -37,6 +52,7 @@ message UserIdentity { string deviceID = 4; int32 platform = 5; string account = 6; + string password = 7; } @@ -52,4 +68,81 @@ message AppletInfo { uint32 priority = 9; uint32 status = 10; int64 createTime = 11; +} + +message Department { + string departmentID = 1; + string faceURL = 2; + string name = 3; + string parentID = 4; + int32 order = 5; + int32 departmentType = 6; + string relatedGroupID = 7; + int64 createTime = 8; + uint32 memberNum = 9; + string position = 10; +} + +message CommonResp { + int32 errCode = 1; + string errMsg = 2; +} + +message OrganizationUser { + string userID = 1; + string nickname = 2; + string englishName = 3; + string faceURL = 4; + int32 gender = 5; + string mobile = 6; + string telephone = 7; + int64 birth = 8; + string email = 9; + int32 order = 10; + int32 status = 11; + int64 createTime = 12; + string ex = 13; + repeated DepartmentMember departmentMemberList = 14; + string station = 15; + string areaCode = 16; +} + +message DepartmentMember { + string userID = 1; + string departmentID = 2; + int32 order = 3; + string position = 4; + int32 leader = 5; + int32 status = 6; + string ex = 7; + int64 entryTime = 8; + int64 terminationTime = 9; + int64 createTime = 10; + Department department = 11; + OrganizationUser organizationUser = 12; +} + +message UserInDepartment { + OrganizationUser organizationUser = 1; + repeated DepartmentMember departmentMemberList = 2; +} + +message Organization { + string logoURL = 1; + string name = 2; + string homepage = 3; + string relatedGroupID = 4; + string introduction = 5; + int64 createTime = 6; + int64 defaultPassword = 7; +} + +message RequestPagination { + int32 pageNumber = 1; + int32 showNumber = 2; +} + +message Operation { + string opUserID = 1; + string operationID = 2; } \ No newline at end of file diff --git a/pkg/proto/gen.cmd b/pkg/proto/gen.cmd index 0e44397a4..8d27969c7 100644 --- a/pkg/proto/gen.cmd +++ b/pkg/proto/gen.cmd @@ -1,3 +1,4 @@ protoc --go_out=plugins=grpc:./common --go_opt=module=github.com/OpenIMSDK/chat/pkg/proto/common common/common.proto protoc --go_out=plugins=grpc:./admin --go_opt=module=github.com/OpenIMSDK/chat/pkg/proto/admin admin/admin.proto -protoc --go_out=plugins=grpc:./chat --go_opt=module=github.com/OpenIMSDK/chat/pkg/proto/chat chat/chat.proto \ No newline at end of file +protoc --go_out=plugins=grpc:./chat --go_opt=module=github.com/OpenIMSDK/chat/pkg/proto/chat chat/chat.proto +protoc --go_out=plugins=grpc:./organization --go_opt=module=github.com/OpenIMSDK/chat/pkg/proto/organization organization/organization.proto \ No newline at end of file diff --git a/pkg/proto/gen.sh b/pkg/proto/gen.sh index 0e44397a4..4755e0e48 100644 --- a/pkg/proto/gen.sh +++ b/pkg/proto/gen.sh @@ -1,3 +1,17 @@ +# Copyright © 2023 OpenIM open source community. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + protoc --go_out=plugins=grpc:./common --go_opt=module=github.com/OpenIMSDK/chat/pkg/proto/common common/common.proto protoc --go_out=plugins=grpc:./admin --go_opt=module=github.com/OpenIMSDK/chat/pkg/proto/admin admin/admin.proto protoc --go_out=plugins=grpc:./chat --go_opt=module=github.com/OpenIMSDK/chat/pkg/proto/chat chat/chat.proto \ No newline at end of file diff --git a/pkg/proto/organization/organization.pb.go b/pkg/proto/organization/organization.pb.go new file mode 100644 index 000000000..c33896d92 --- /dev/null +++ b/pkg/proto/organization/organization.pb.go @@ -0,0 +1,6333 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.29.1 +// protoc v4.22.0 +// source: organization/organization.proto + +package organization + +import ( + context "context" + common "github.com/OpenIMSDK/chat/pkg/proto/common" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type CreateDepartmentReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DepartmentInfo *common.Department `protobuf:"bytes,1,opt,name=departmentInfo,proto3" json:"departmentInfo"` +} + +func (x *CreateDepartmentReq) Reset() { + *x = CreateDepartmentReq{} + if protoimpl.UnsafeEnabled { + mi := &file_organization_organization_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateDepartmentReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateDepartmentReq) ProtoMessage() {} + +func (x *CreateDepartmentReq) ProtoReflect() protoreflect.Message { + mi := &file_organization_organization_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 CreateDepartmentReq.ProtoReflect.Descriptor instead. +func (*CreateDepartmentReq) Descriptor() ([]byte, []int) { + return file_organization_organization_proto_rawDescGZIP(), []int{0} +} + +func (x *CreateDepartmentReq) GetDepartmentInfo() *common.Department { + if x != nil { + return x.DepartmentInfo + } + return nil +} + +type CreateDepartmentResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DepartmentInfo *common.Department `protobuf:"bytes,1,opt,name=departmentInfo,proto3" json:"departmentInfo"` +} + +func (x *CreateDepartmentResp) Reset() { + *x = CreateDepartmentResp{} + if protoimpl.UnsafeEnabled { + mi := &file_organization_organization_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateDepartmentResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateDepartmentResp) ProtoMessage() {} + +func (x *CreateDepartmentResp) ProtoReflect() protoreflect.Message { + mi := &file_organization_organization_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 CreateDepartmentResp.ProtoReflect.Descriptor instead. +func (*CreateDepartmentResp) Descriptor() ([]byte, []int) { + return file_organization_organization_proto_rawDescGZIP(), []int{1} +} + +func (x *CreateDepartmentResp) GetDepartmentInfo() *common.Department { + if x != nil { + return x.DepartmentInfo + } + return nil +} + +type UpdateDepartmentReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DepartmentInfo *common.Department `protobuf:"bytes,1,opt,name=departmentInfo,proto3" json:"departmentInfo"` +} + +func (x *UpdateDepartmentReq) Reset() { + *x = UpdateDepartmentReq{} + if protoimpl.UnsafeEnabled { + mi := &file_organization_organization_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateDepartmentReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateDepartmentReq) ProtoMessage() {} + +func (x *UpdateDepartmentReq) ProtoReflect() protoreflect.Message { + mi := &file_organization_organization_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 UpdateDepartmentReq.ProtoReflect.Descriptor instead. +func (*UpdateDepartmentReq) Descriptor() ([]byte, []int) { + return file_organization_organization_proto_rawDescGZIP(), []int{2} +} + +func (x *UpdateDepartmentReq) GetDepartmentInfo() *common.Department { + if x != nil { + return x.DepartmentInfo + } + return nil +} + +type UpdateDepartmentResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *UpdateDepartmentResp) Reset() { + *x = UpdateDepartmentResp{} + if protoimpl.UnsafeEnabled { + mi := &file_organization_organization_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateDepartmentResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateDepartmentResp) ProtoMessage() {} + +func (x *UpdateDepartmentResp) ProtoReflect() protoreflect.Message { + mi := &file_organization_organization_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 UpdateDepartmentResp.ProtoReflect.Descriptor instead. +func (*UpdateDepartmentResp) Descriptor() ([]byte, []int) { + return file_organization_organization_proto_rawDescGZIP(), []int{3} +} + +type GetOrganizationDepartmentReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GetOrganizationDepartmentReq) Reset() { + *x = GetOrganizationDepartmentReq{} + if protoimpl.UnsafeEnabled { + mi := &file_organization_organization_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetOrganizationDepartmentReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetOrganizationDepartmentReq) ProtoMessage() {} + +func (x *GetOrganizationDepartmentReq) ProtoReflect() protoreflect.Message { + mi := &file_organization_organization_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 GetOrganizationDepartmentReq.ProtoReflect.Descriptor instead. +func (*GetOrganizationDepartmentReq) Descriptor() ([]byte, []int) { + return file_organization_organization_proto_rawDescGZIP(), []int{4} +} + +type DepartmentInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Department *common.Department `protobuf:"bytes,1,opt,name=department,proto3" json:"department"` + SubDepartmentList []*DepartmentInfo `protobuf:"bytes,2,rep,name=subDepartmentList,proto3" json:"subDepartmentList"` +} + +func (x *DepartmentInfo) Reset() { + *x = DepartmentInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_organization_organization_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DepartmentInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DepartmentInfo) ProtoMessage() {} + +func (x *DepartmentInfo) ProtoReflect() protoreflect.Message { + mi := &file_organization_organization_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 DepartmentInfo.ProtoReflect.Descriptor instead. +func (*DepartmentInfo) Descriptor() ([]byte, []int) { + return file_organization_organization_proto_rawDescGZIP(), []int{5} +} + +func (x *DepartmentInfo) GetDepartment() *common.Department { + if x != nil { + return x.Department + } + return nil +} + +func (x *DepartmentInfo) GetSubDepartmentList() []*DepartmentInfo { + if x != nil { + return x.SubDepartmentList + } + return nil +} + +type GetOrganizationDepartmentResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DepartmentList []*DepartmentInfo `protobuf:"bytes,1,rep,name=departmentList,proto3" json:"departmentList"` +} + +func (x *GetOrganizationDepartmentResp) Reset() { + *x = GetOrganizationDepartmentResp{} + if protoimpl.UnsafeEnabled { + mi := &file_organization_organization_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetOrganizationDepartmentResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetOrganizationDepartmentResp) ProtoMessage() {} + +func (x *GetOrganizationDepartmentResp) ProtoReflect() protoreflect.Message { + mi := &file_organization_organization_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 GetOrganizationDepartmentResp.ProtoReflect.Descriptor instead. +func (*GetOrganizationDepartmentResp) Descriptor() ([]byte, []int) { + return file_organization_organization_proto_rawDescGZIP(), []int{6} +} + +func (x *GetOrganizationDepartmentResp) GetDepartmentList() []*DepartmentInfo { + if x != nil { + return x.DepartmentList + } + return nil +} + +type DeleteDepartmentReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DepartmentIDList []string `protobuf:"bytes,1,rep,name=departmentIDList,proto3" json:"departmentIDList"` +} + +func (x *DeleteDepartmentReq) Reset() { + *x = DeleteDepartmentReq{} + if protoimpl.UnsafeEnabled { + mi := &file_organization_organization_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteDepartmentReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteDepartmentReq) ProtoMessage() {} + +func (x *DeleteDepartmentReq) ProtoReflect() protoreflect.Message { + mi := &file_organization_organization_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 DeleteDepartmentReq.ProtoReflect.Descriptor instead. +func (*DeleteDepartmentReq) Descriptor() ([]byte, []int) { + return file_organization_organization_proto_rawDescGZIP(), []int{7} +} + +func (x *DeleteDepartmentReq) GetDepartmentIDList() []string { + if x != nil { + return x.DepartmentIDList + } + return nil +} + +type DeleteDepartmentResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *DeleteDepartmentResp) Reset() { + *x = DeleteDepartmentResp{} + if protoimpl.UnsafeEnabled { + mi := &file_organization_organization_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteDepartmentResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteDepartmentResp) ProtoMessage() {} + +func (x *DeleteDepartmentResp) ProtoReflect() protoreflect.Message { + mi := &file_organization_organization_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteDepartmentResp.ProtoReflect.Descriptor instead. +func (*DeleteDepartmentResp) Descriptor() ([]byte, []int) { + return file_organization_organization_proto_rawDescGZIP(), []int{8} +} + +type GetDepartmentParentIDListReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DepartmentID string `protobuf:"bytes,1,opt,name=departmentID,proto3" json:"departmentID"` +} + +func (x *GetDepartmentParentIDListReq) Reset() { + *x = GetDepartmentParentIDListReq{} + if protoimpl.UnsafeEnabled { + mi := &file_organization_organization_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetDepartmentParentIDListReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDepartmentParentIDListReq) ProtoMessage() {} + +func (x *GetDepartmentParentIDListReq) ProtoReflect() protoreflect.Message { + mi := &file_organization_organization_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetDepartmentParentIDListReq.ProtoReflect.Descriptor instead. +func (*GetDepartmentParentIDListReq) Descriptor() ([]byte, []int) { + return file_organization_organization_proto_rawDescGZIP(), []int{9} +} + +func (x *GetDepartmentParentIDListReq) GetDepartmentID() string { + if x != nil { + return x.DepartmentID + } + return "" +} + +type GetDepartmentParentIDListResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ParentIDList []string `protobuf:"bytes,1,rep,name=parentIDList,proto3" json:"parentIDList"` +} + +func (x *GetDepartmentParentIDListResp) Reset() { + *x = GetDepartmentParentIDListResp{} + if protoimpl.UnsafeEnabled { + mi := &file_organization_organization_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetDepartmentParentIDListResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDepartmentParentIDListResp) ProtoMessage() {} + +func (x *GetDepartmentParentIDListResp) ProtoReflect() protoreflect.Message { + mi := &file_organization_organization_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetDepartmentParentIDListResp.ProtoReflect.Descriptor instead. +func (*GetDepartmentParentIDListResp) Descriptor() ([]byte, []int) { + return file_organization_organization_proto_rawDescGZIP(), []int{10} +} + +func (x *GetDepartmentParentIDListResp) GetParentIDList() []string { + if x != nil { + return x.ParentIDList + } + return nil +} + +type CreateOrganizationUserReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + OrganizationUser *common.OrganizationUser `protobuf:"bytes,1,opt,name=organizationUser,proto3" json:"organizationUser"` +} + +func (x *CreateOrganizationUserReq) Reset() { + *x = CreateOrganizationUserReq{} + if protoimpl.UnsafeEnabled { + mi := &file_organization_organization_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateOrganizationUserReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateOrganizationUserReq) ProtoMessage() {} + +func (x *CreateOrganizationUserReq) ProtoReflect() protoreflect.Message { + mi := &file_organization_organization_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateOrganizationUserReq.ProtoReflect.Descriptor instead. +func (*CreateOrganizationUserReq) Descriptor() ([]byte, []int) { + return file_organization_organization_proto_rawDescGZIP(), []int{11} +} + +func (x *CreateOrganizationUserReq) GetOrganizationUser() *common.OrganizationUser { + if x != nil { + return x.OrganizationUser + } + return nil +} + +type CreateOrganizationUserResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *CreateOrganizationUserResp) Reset() { + *x = CreateOrganizationUserResp{} + if protoimpl.UnsafeEnabled { + mi := &file_organization_organization_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateOrganizationUserResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateOrganizationUserResp) ProtoMessage() {} + +func (x *CreateOrganizationUserResp) ProtoReflect() protoreflect.Message { + mi := &file_organization_organization_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateOrganizationUserResp.ProtoReflect.Descriptor instead. +func (*CreateOrganizationUserResp) Descriptor() ([]byte, []int) { + return file_organization_organization_proto_rawDescGZIP(), []int{12} +} + +type UpdateOrganizationUserReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + OrganizationUser *common.OrganizationUser `protobuf:"bytes,1,opt,name=organizationUser,proto3" json:"organizationUser"` +} + +func (x *UpdateOrganizationUserReq) Reset() { + *x = UpdateOrganizationUserReq{} + if protoimpl.UnsafeEnabled { + mi := &file_organization_organization_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateOrganizationUserReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateOrganizationUserReq) ProtoMessage() {} + +func (x *UpdateOrganizationUserReq) ProtoReflect() protoreflect.Message { + mi := &file_organization_organization_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateOrganizationUserReq.ProtoReflect.Descriptor instead. +func (*UpdateOrganizationUserReq) Descriptor() ([]byte, []int) { + return file_organization_organization_proto_rawDescGZIP(), []int{13} +} + +func (x *UpdateOrganizationUserReq) GetOrganizationUser() *common.OrganizationUser { + if x != nil { + return x.OrganizationUser + } + return nil +} + +type UpdateOrganizationUserResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *UpdateOrganizationUserResp) Reset() { + *x = UpdateOrganizationUserResp{} + if protoimpl.UnsafeEnabled { + mi := &file_organization_organization_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateOrganizationUserResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateOrganizationUserResp) ProtoMessage() {} + +func (x *UpdateOrganizationUserResp) ProtoReflect() protoreflect.Message { + mi := &file_organization_organization_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateOrganizationUserResp.ProtoReflect.Descriptor instead. +func (*UpdateOrganizationUserResp) Descriptor() ([]byte, []int) { + return file_organization_organization_proto_rawDescGZIP(), []int{14} +} + +type CreateDepartmentMemberReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DepartmentMember *common.DepartmentMember `protobuf:"bytes,1,opt,name=departmentMember,proto3" json:"departmentMember"` +} + +func (x *CreateDepartmentMemberReq) Reset() { + *x = CreateDepartmentMemberReq{} + if protoimpl.UnsafeEnabled { + mi := &file_organization_organization_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateDepartmentMemberReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateDepartmentMemberReq) ProtoMessage() {} + +func (x *CreateDepartmentMemberReq) ProtoReflect() protoreflect.Message { + mi := &file_organization_organization_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateDepartmentMemberReq.ProtoReflect.Descriptor instead. +func (*CreateDepartmentMemberReq) Descriptor() ([]byte, []int) { + return file_organization_organization_proto_rawDescGZIP(), []int{15} +} + +func (x *CreateDepartmentMemberReq) GetDepartmentMember() *common.DepartmentMember { + if x != nil { + return x.DepartmentMember + } + return nil +} + +type CreateDepartmentMemberResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *CreateDepartmentMemberResp) Reset() { + *x = CreateDepartmentMemberResp{} + if protoimpl.UnsafeEnabled { + mi := &file_organization_organization_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateDepartmentMemberResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateDepartmentMemberResp) ProtoMessage() {} + +func (x *CreateDepartmentMemberResp) ProtoReflect() protoreflect.Message { + mi := &file_organization_organization_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateDepartmentMemberResp.ProtoReflect.Descriptor instead. +func (*CreateDepartmentMemberResp) Descriptor() ([]byte, []int) { + return file_organization_organization_proto_rawDescGZIP(), []int{16} +} + +type GetUserInDepartmentReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"` +} + +func (x *GetUserInDepartmentReq) Reset() { + *x = GetUserInDepartmentReq{} + if protoimpl.UnsafeEnabled { + mi := &file_organization_organization_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetUserInDepartmentReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetUserInDepartmentReq) ProtoMessage() {} + +func (x *GetUserInDepartmentReq) ProtoReflect() protoreflect.Message { + mi := &file_organization_organization_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetUserInDepartmentReq.ProtoReflect.Descriptor instead. +func (*GetUserInDepartmentReq) Descriptor() ([]byte, []int) { + return file_organization_organization_proto_rawDescGZIP(), []int{17} +} + +func (x *GetUserInDepartmentReq) GetUserID() string { + if x != nil { + return x.UserID + } + return "" +} + +type GetUserInDepartmentResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UserInDepartment *common.UserInDepartment `protobuf:"bytes,1,opt,name=userInDepartment,proto3" json:"userInDepartment"` +} + +func (x *GetUserInDepartmentResp) Reset() { + *x = GetUserInDepartmentResp{} + if protoimpl.UnsafeEnabled { + mi := &file_organization_organization_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetUserInDepartmentResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetUserInDepartmentResp) ProtoMessage() {} + +func (x *GetUserInDepartmentResp) ProtoReflect() protoreflect.Message { + mi := &file_organization_organization_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetUserInDepartmentResp.ProtoReflect.Descriptor instead. +func (*GetUserInDepartmentResp) Descriptor() ([]byte, []int) { + return file_organization_organization_proto_rawDescGZIP(), []int{18} +} + +func (x *GetUserInDepartmentResp) GetUserInDepartment() *common.UserInDepartment { + if x != nil { + return x.UserInDepartment + } + return nil +} + +type UpdateUserInDepartmentReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DepartmentMember *common.DepartmentMember `protobuf:"bytes,1,opt,name=departmentMember,proto3" json:"departmentMember"` +} + +func (x *UpdateUserInDepartmentReq) Reset() { + *x = UpdateUserInDepartmentReq{} + if protoimpl.UnsafeEnabled { + mi := &file_organization_organization_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateUserInDepartmentReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateUserInDepartmentReq) ProtoMessage() {} + +func (x *UpdateUserInDepartmentReq) ProtoReflect() protoreflect.Message { + mi := &file_organization_organization_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateUserInDepartmentReq.ProtoReflect.Descriptor instead. +func (*UpdateUserInDepartmentReq) Descriptor() ([]byte, []int) { + return file_organization_organization_proto_rawDescGZIP(), []int{19} +} + +func (x *UpdateUserInDepartmentReq) GetDepartmentMember() *common.DepartmentMember { + if x != nil { + return x.DepartmentMember + } + return nil +} + +type UpdateUserInDepartmentResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *UpdateUserInDepartmentResp) Reset() { + *x = UpdateUserInDepartmentResp{} + if protoimpl.UnsafeEnabled { + mi := &file_organization_organization_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateUserInDepartmentResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateUserInDepartmentResp) ProtoMessage() {} + +func (x *UpdateUserInDepartmentResp) ProtoReflect() protoreflect.Message { + mi := &file_organization_organization_proto_msgTypes[20] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateUserInDepartmentResp.ProtoReflect.Descriptor instead. +func (*UpdateUserInDepartmentResp) Descriptor() ([]byte, []int) { + return file_organization_organization_proto_rawDescGZIP(), []int{20} +} + +type DeleteUserInDepartmentReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"` + DepartmentID string `protobuf:"bytes,2,opt,name=departmentID,proto3" json:"departmentID"` +} + +func (x *DeleteUserInDepartmentReq) Reset() { + *x = DeleteUserInDepartmentReq{} + if protoimpl.UnsafeEnabled { + mi := &file_organization_organization_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteUserInDepartmentReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteUserInDepartmentReq) ProtoMessage() {} + +func (x *DeleteUserInDepartmentReq) ProtoReflect() protoreflect.Message { + mi := &file_organization_organization_proto_msgTypes[21] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteUserInDepartmentReq.ProtoReflect.Descriptor instead. +func (*DeleteUserInDepartmentReq) Descriptor() ([]byte, []int) { + return file_organization_organization_proto_rawDescGZIP(), []int{21} +} + +func (x *DeleteUserInDepartmentReq) GetUserID() string { + if x != nil { + return x.UserID + } + return "" +} + +func (x *DeleteUserInDepartmentReq) GetDepartmentID() string { + if x != nil { + return x.DepartmentID + } + return "" +} + +type DeleteUserInDepartmentResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *DeleteUserInDepartmentResp) Reset() { + *x = DeleteUserInDepartmentResp{} + if protoimpl.UnsafeEnabled { + mi := &file_organization_organization_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteUserInDepartmentResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteUserInDepartmentResp) ProtoMessage() {} + +func (x *DeleteUserInDepartmentResp) ProtoReflect() protoreflect.Message { + mi := &file_organization_organization_proto_msgTypes[22] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteUserInDepartmentResp.ProtoReflect.Descriptor instead. +func (*DeleteUserInDepartmentResp) Descriptor() ([]byte, []int) { + return file_organization_organization_proto_rawDescGZIP(), []int{22} +} + +type DeleteOrganizationUserReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"` +} + +func (x *DeleteOrganizationUserReq) Reset() { + *x = DeleteOrganizationUserReq{} + if protoimpl.UnsafeEnabled { + mi := &file_organization_organization_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteOrganizationUserReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteOrganizationUserReq) ProtoMessage() {} + +func (x *DeleteOrganizationUserReq) ProtoReflect() protoreflect.Message { + mi := &file_organization_organization_proto_msgTypes[23] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteOrganizationUserReq.ProtoReflect.Descriptor instead. +func (*DeleteOrganizationUserReq) Descriptor() ([]byte, []int) { + return file_organization_organization_proto_rawDescGZIP(), []int{23} +} + +func (x *DeleteOrganizationUserReq) GetUserID() string { + if x != nil { + return x.UserID + } + return "" +} + +type DeleteOrganizationUserResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *DeleteOrganizationUserResp) Reset() { + *x = DeleteOrganizationUserResp{} + if protoimpl.UnsafeEnabled { + mi := &file_organization_organization_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteOrganizationUserResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteOrganizationUserResp) ProtoMessage() {} + +func (x *DeleteOrganizationUserResp) ProtoReflect() protoreflect.Message { + mi := &file_organization_organization_proto_msgTypes[24] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteOrganizationUserResp.ProtoReflect.Descriptor instead. +func (*DeleteOrganizationUserResp) Descriptor() ([]byte, []int) { + return file_organization_organization_proto_rawDescGZIP(), []int{24} +} + +type GetDepartmentRelatedGroupIDListReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DepartmentIDList []string `protobuf:"bytes,1,rep,name=departmentIDList,proto3" json:"departmentIDList"` +} + +func (x *GetDepartmentRelatedGroupIDListReq) Reset() { + *x = GetDepartmentRelatedGroupIDListReq{} + if protoimpl.UnsafeEnabled { + mi := &file_organization_organization_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetDepartmentRelatedGroupIDListReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDepartmentRelatedGroupIDListReq) ProtoMessage() {} + +func (x *GetDepartmentRelatedGroupIDListReq) ProtoReflect() protoreflect.Message { + mi := &file_organization_organization_proto_msgTypes[25] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetDepartmentRelatedGroupIDListReq.ProtoReflect.Descriptor instead. +func (*GetDepartmentRelatedGroupIDListReq) Descriptor() ([]byte, []int) { + return file_organization_organization_proto_rawDescGZIP(), []int{25} +} + +func (x *GetDepartmentRelatedGroupIDListReq) GetDepartmentIDList() []string { + if x != nil { + return x.DepartmentIDList + } + return nil +} + +type GetDepartmentRelatedGroupIDListResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + GroupIDList []string `protobuf:"bytes,1,rep,name=groupIDList,proto3" json:"groupIDList"` +} + +func (x *GetDepartmentRelatedGroupIDListResp) Reset() { + *x = GetDepartmentRelatedGroupIDListResp{} + if protoimpl.UnsafeEnabled { + mi := &file_organization_organization_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetDepartmentRelatedGroupIDListResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDepartmentRelatedGroupIDListResp) ProtoMessage() {} + +func (x *GetDepartmentRelatedGroupIDListResp) ProtoReflect() protoreflect.Message { + mi := &file_organization_organization_proto_msgTypes[26] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetDepartmentRelatedGroupIDListResp.ProtoReflect.Descriptor instead. +func (*GetDepartmentRelatedGroupIDListResp) Descriptor() ([]byte, []int) { + return file_organization_organization_proto_rawDescGZIP(), []int{26} +} + +func (x *GetDepartmentRelatedGroupIDListResp) GetGroupIDList() []string { + if x != nil { + return x.GroupIDList + } + return nil +} + +type GetUserInOrganizationReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UserIDList []string `protobuf:"bytes,1,rep,name=userIDList,proto3" json:"userIDList"` +} + +func (x *GetUserInOrganizationReq) Reset() { + *x = GetUserInOrganizationReq{} + if protoimpl.UnsafeEnabled { + mi := &file_organization_organization_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetUserInOrganizationReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetUserInOrganizationReq) ProtoMessage() {} + +func (x *GetUserInOrganizationReq) ProtoReflect() protoreflect.Message { + mi := &file_organization_organization_proto_msgTypes[27] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetUserInOrganizationReq.ProtoReflect.Descriptor instead. +func (*GetUserInOrganizationReq) Descriptor() ([]byte, []int) { + return file_organization_organization_proto_rawDescGZIP(), []int{27} +} + +func (x *GetUserInOrganizationReq) GetUserIDList() []string { + if x != nil { + return x.UserIDList + } + return nil +} + +type GetUserInOrganizationResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + OrganizationUsers []*common.OrganizationUser `protobuf:"bytes,1,rep,name=organizationUsers,proto3" json:"organizationUsers"` +} + +func (x *GetUserInOrganizationResp) Reset() { + *x = GetUserInOrganizationResp{} + if protoimpl.UnsafeEnabled { + mi := &file_organization_organization_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetUserInOrganizationResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetUserInOrganizationResp) ProtoMessage() {} + +func (x *GetUserInOrganizationResp) ProtoReflect() protoreflect.Message { + mi := &file_organization_organization_proto_msgTypes[28] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetUserInOrganizationResp.ProtoReflect.Descriptor instead. +func (*GetUserInOrganizationResp) Descriptor() ([]byte, []int) { + return file_organization_organization_proto_rawDescGZIP(), []int{28} +} + +func (x *GetUserInOrganizationResp) GetOrganizationUsers() []*common.OrganizationUser { + if x != nil { + return x.OrganizationUsers + } + return nil +} + +type GetCompleteOrganizationReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GetCompleteOrganizationReq) Reset() { + *x = GetCompleteOrganizationReq{} + if protoimpl.UnsafeEnabled { + mi := &file_organization_organization_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetCompleteOrganizationReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetCompleteOrganizationReq) ProtoMessage() {} + +func (x *GetCompleteOrganizationReq) ProtoReflect() protoreflect.Message { + mi := &file_organization_organization_proto_msgTypes[29] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetCompleteOrganizationReq.ProtoReflect.Descriptor instead. +func (*GetCompleteOrganizationReq) Descriptor() ([]byte, []int) { + return file_organization_organization_proto_rawDescGZIP(), []int{29} +} + +type CompleteOrganization struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PeopleNumber uint32 `protobuf:"varint,1,opt,name=peopleNumber,proto3" json:"peopleNumber"` + List []*CompleteOrganization `protobuf:"bytes,2,rep,name=list,proto3" json:"list"` + DepartmentID string `protobuf:"bytes,3,opt,name=departmentID,proto3" json:"departmentID"` + FaceURL string `protobuf:"bytes,4,opt,name=faceURL,proto3" json:"faceURL"` + Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name"` + ParentID string `protobuf:"bytes,6,opt,name=parentID,proto3" json:"parentID"` + Order int32 `protobuf:"varint,7,opt,name=order,proto3" json:"order"` + DepartmentType int32 `protobuf:"varint,8,opt,name=departmentType,proto3" json:"departmentType"` + CreateTime uint32 `protobuf:"varint,9,opt,name=createTime,proto3" json:"createTime"` + Ex string `protobuf:"bytes,10,opt,name=ex,proto3" json:"ex"` +} + +func (x *CompleteOrganization) Reset() { + *x = CompleteOrganization{} + if protoimpl.UnsafeEnabled { + mi := &file_organization_organization_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CompleteOrganization) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CompleteOrganization) ProtoMessage() {} + +func (x *CompleteOrganization) ProtoReflect() protoreflect.Message { + mi := &file_organization_organization_proto_msgTypes[30] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CompleteOrganization.ProtoReflect.Descriptor instead. +func (*CompleteOrganization) Descriptor() ([]byte, []int) { + return file_organization_organization_proto_rawDescGZIP(), []int{30} +} + +func (x *CompleteOrganization) GetPeopleNumber() uint32 { + if x != nil { + return x.PeopleNumber + } + return 0 +} + +func (x *CompleteOrganization) GetList() []*CompleteOrganization { + if x != nil { + return x.List + } + return nil +} + +func (x *CompleteOrganization) GetDepartmentID() string { + if x != nil { + return x.DepartmentID + } + return "" +} + +func (x *CompleteOrganization) GetFaceURL() string { + if x != nil { + return x.FaceURL + } + return "" +} + +func (x *CompleteOrganization) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *CompleteOrganization) GetParentID() string { + if x != nil { + return x.ParentID + } + return "" +} + +func (x *CompleteOrganization) GetOrder() int32 { + if x != nil { + return x.Order + } + return 0 +} + +func (x *CompleteOrganization) GetDepartmentType() int32 { + if x != nil { + return x.DepartmentType + } + return 0 +} + +func (x *CompleteOrganization) GetCreateTime() uint32 { + if x != nil { + return x.CreateTime + } + return 0 +} + +func (x *CompleteOrganization) GetEx() string { + if x != nil { + return x.Ex + } + return "" +} + +type GetCompleteOrganizationResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + List []*CompleteOrganization `protobuf:"bytes,1,rep,name=list,proto3" json:"list"` +} + +func (x *GetCompleteOrganizationResp) Reset() { + *x = GetCompleteOrganizationResp{} + if protoimpl.UnsafeEnabled { + mi := &file_organization_organization_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetCompleteOrganizationResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetCompleteOrganizationResp) ProtoMessage() {} + +func (x *GetCompleteOrganizationResp) ProtoReflect() protoreflect.Message { + mi := &file_organization_organization_proto_msgTypes[31] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetCompleteOrganizationResp.ProtoReflect.Descriptor instead. +func (*GetCompleteOrganizationResp) Descriptor() ([]byte, []int) { + return file_organization_organization_proto_rawDescGZIP(), []int{31} +} + +func (x *GetCompleteOrganizationResp) GetList() []*CompleteOrganization { + if x != nil { + return x.List + } + return nil +} + +type GetUsersInDepartmentReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UserIDList []string `protobuf:"bytes,1,rep,name=userIDList,proto3" json:"userIDList"` +} + +func (x *GetUsersInDepartmentReq) Reset() { + *x = GetUsersInDepartmentReq{} + if protoimpl.UnsafeEnabled { + mi := &file_organization_organization_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetUsersInDepartmentReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetUsersInDepartmentReq) ProtoMessage() {} + +func (x *GetUsersInDepartmentReq) ProtoReflect() protoreflect.Message { + mi := &file_organization_organization_proto_msgTypes[32] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetUsersInDepartmentReq.ProtoReflect.Descriptor instead. +func (*GetUsersInDepartmentReq) Descriptor() ([]byte, []int) { + return file_organization_organization_proto_rawDescGZIP(), []int{32} +} + +func (x *GetUsersInDepartmentReq) GetUserIDList() []string { + if x != nil { + return x.UserIDList + } + return nil +} + +type GetUsersInDepartmentResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + List []*common.UserInDepartment `protobuf:"bytes,1,rep,name=list,proto3" json:"list"` +} + +func (x *GetUsersInDepartmentResp) Reset() { + *x = GetUsersInDepartmentResp{} + if protoimpl.UnsafeEnabled { + mi := &file_organization_organization_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetUsersInDepartmentResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetUsersInDepartmentResp) ProtoMessage() {} + +func (x *GetUsersInDepartmentResp) ProtoReflect() protoreflect.Message { + mi := &file_organization_organization_proto_msgTypes[33] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetUsersInDepartmentResp.ProtoReflect.Descriptor instead. +func (*GetUsersInDepartmentResp) Descriptor() ([]byte, []int) { + return file_organization_organization_proto_rawDescGZIP(), []int{33} +} + +func (x *GetUsersInDepartmentResp) GetList() []*common.UserInDepartment { + if x != nil { + return x.List + } + return nil +} + +type GetSearchUserListReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PageNumber uint32 `protobuf:"varint,1,opt,name=pageNumber,proto3" json:"pageNumber"` + ShowNumber uint32 `protobuf:"varint,2,opt,name=showNumber,proto3" json:"showNumber"` + Text string `protobuf:"bytes,3,opt,name=text,proto3" json:"text"` + Sorts []*GetSearchUserListSort `protobuf:"bytes,4,rep,name=sorts,proto3" json:"sorts"` + DepartmentIDList []string `protobuf:"bytes,5,rep,name=departmentIDList,proto3" json:"departmentIDList"` + PositionList []string `protobuf:"bytes,6,rep,name=positionList,proto3" json:"positionList"` +} + +func (x *GetSearchUserListReq) Reset() { + *x = GetSearchUserListReq{} + if protoimpl.UnsafeEnabled { + mi := &file_organization_organization_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetSearchUserListReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSearchUserListReq) ProtoMessage() {} + +func (x *GetSearchUserListReq) ProtoReflect() protoreflect.Message { + mi := &file_organization_organization_proto_msgTypes[34] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSearchUserListReq.ProtoReflect.Descriptor instead. +func (*GetSearchUserListReq) Descriptor() ([]byte, []int) { + return file_organization_organization_proto_rawDescGZIP(), []int{34} +} + +func (x *GetSearchUserListReq) GetPageNumber() uint32 { + if x != nil { + return x.PageNumber + } + return 0 +} + +func (x *GetSearchUserListReq) GetShowNumber() uint32 { + if x != nil { + return x.ShowNumber + } + return 0 +} + +func (x *GetSearchUserListReq) GetText() string { + if x != nil { + return x.Text + } + return "" +} + +func (x *GetSearchUserListReq) GetSorts() []*GetSearchUserListSort { + if x != nil { + return x.Sorts + } + return nil +} + +func (x *GetSearchUserListReq) GetDepartmentIDList() []string { + if x != nil { + return x.DepartmentIDList + } + return nil +} + +func (x *GetSearchUserListReq) GetPositionList() []string { + if x != nil { + return x.PositionList + } + return nil +} + +type GetSearchUserListSort struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Field string `protobuf:"bytes,1,opt,name=field,proto3" json:"field"` + Rule string `protobuf:"bytes,2,opt,name=rule,proto3" json:"rule"` +} + +func (x *GetSearchUserListSort) Reset() { + *x = GetSearchUserListSort{} + if protoimpl.UnsafeEnabled { + mi := &file_organization_organization_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetSearchUserListSort) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSearchUserListSort) ProtoMessage() {} + +func (x *GetSearchUserListSort) ProtoReflect() protoreflect.Message { + mi := &file_organization_organization_proto_msgTypes[35] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSearchUserListSort.ProtoReflect.Descriptor instead. +func (*GetSearchUserListSort) Descriptor() ([]byte, []int) { + return file_organization_organization_proto_rawDescGZIP(), []int{35} +} + +func (x *GetSearchUserListSort) GetField() string { + if x != nil { + return x.Field + } + return "" +} + +func (x *GetSearchUserListSort) GetRule() string { + if x != nil { + return x.Rule + } + return "" +} + +type GetSearchUserListResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UserList []*common.UserInDepartment `protobuf:"bytes,1,rep,name=userList,proto3" json:"userList"` + Total uint32 `protobuf:"varint,2,opt,name=Total,proto3" json:"Total"` +} + +func (x *GetSearchUserListResp) Reset() { + *x = GetSearchUserListResp{} + if protoimpl.UnsafeEnabled { + mi := &file_organization_organization_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetSearchUserListResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSearchUserListResp) ProtoMessage() {} + +func (x *GetSearchUserListResp) ProtoReflect() protoreflect.Message { + mi := &file_organization_organization_proto_msgTypes[36] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSearchUserListResp.ProtoReflect.Descriptor instead. +func (*GetSearchUserListResp) Descriptor() ([]byte, []int) { + return file_organization_organization_proto_rawDescGZIP(), []int{36} +} + +func (x *GetSearchUserListResp) GetUserList() []*common.UserInDepartment { + if x != nil { + return x.UserList + } + return nil +} + +func (x *GetSearchUserListResp) GetTotal() uint32 { + if x != nil { + return x.Total + } + return 0 +} + +type SetOrganizationReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Organization *common.Organization `protobuf:"bytes,1,opt,name=organization,proto3" json:"organization"` +} + +func (x *SetOrganizationReq) Reset() { + *x = SetOrganizationReq{} + if protoimpl.UnsafeEnabled { + mi := &file_organization_organization_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetOrganizationReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetOrganizationReq) ProtoMessage() {} + +func (x *SetOrganizationReq) ProtoReflect() protoreflect.Message { + mi := &file_organization_organization_proto_msgTypes[37] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetOrganizationReq.ProtoReflect.Descriptor instead. +func (*SetOrganizationReq) Descriptor() ([]byte, []int) { + return file_organization_organization_proto_rawDescGZIP(), []int{37} +} + +func (x *SetOrganizationReq) GetOrganization() *common.Organization { + if x != nil { + return x.Organization + } + return nil +} + +type SetOrganizationResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SetOrganizationResp) Reset() { + *x = SetOrganizationResp{} + if protoimpl.UnsafeEnabled { + mi := &file_organization_organization_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetOrganizationResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetOrganizationResp) ProtoMessage() {} + +func (x *SetOrganizationResp) ProtoReflect() protoreflect.Message { + mi := &file_organization_organization_proto_msgTypes[38] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetOrganizationResp.ProtoReflect.Descriptor instead. +func (*SetOrganizationResp) Descriptor() ([]byte, []int) { + return file_organization_organization_proto_rawDescGZIP(), []int{38} +} + +type GetOrganizationReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GetOrganizationReq) Reset() { + *x = GetOrganizationReq{} + if protoimpl.UnsafeEnabled { + mi := &file_organization_organization_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetOrganizationReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetOrganizationReq) ProtoMessage() {} + +func (x *GetOrganizationReq) ProtoReflect() protoreflect.Message { + mi := &file_organization_organization_proto_msgTypes[39] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetOrganizationReq.ProtoReflect.Descriptor instead. +func (*GetOrganizationReq) Descriptor() ([]byte, []int) { + return file_organization_organization_proto_rawDescGZIP(), []int{39} +} + +type GetOrganizationResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Organization *common.Organization `protobuf:"bytes,1,opt,name=organization,proto3" json:"organization"` +} + +func (x *GetOrganizationResp) Reset() { + *x = GetOrganizationResp{} + if protoimpl.UnsafeEnabled { + mi := &file_organization_organization_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetOrganizationResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetOrganizationResp) ProtoMessage() {} + +func (x *GetOrganizationResp) ProtoReflect() protoreflect.Message { + mi := &file_organization_organization_proto_msgTypes[40] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetOrganizationResp.ProtoReflect.Descriptor instead. +func (*GetOrganizationResp) Descriptor() ([]byte, []int) { + return file_organization_organization_proto_rawDescGZIP(), []int{40} +} + +func (x *GetOrganizationResp) GetOrganization() *common.Organization { + if x != nil { + return x.Organization + } + return nil +} + +type GetSubDepartmentReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DepartmentID string `protobuf:"bytes,1,opt,name=departmentID,proto3" json:"departmentID"` +} + +func (x *GetSubDepartmentReq) Reset() { + *x = GetSubDepartmentReq{} + if protoimpl.UnsafeEnabled { + mi := &file_organization_organization_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetSubDepartmentReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSubDepartmentReq) ProtoMessage() {} + +func (x *GetSubDepartmentReq) ProtoReflect() protoreflect.Message { + mi := &file_organization_organization_proto_msgTypes[41] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSubDepartmentReq.ProtoReflect.Descriptor instead. +func (*GetSubDepartmentReq) Descriptor() ([]byte, []int) { + return file_organization_organization_proto_rawDescGZIP(), []int{41} +} + +func (x *GetSubDepartmentReq) GetDepartmentID() string { + if x != nil { + return x.DepartmentID + } + return "" +} + +type GetSubDepartmentResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DepartmentMemberList []*common.DepartmentMember `protobuf:"bytes,1,rep,name=departmentMemberList,proto3" json:"departmentMemberList"` + DepartmentList []*common.Department `protobuf:"bytes,2,rep,name=departmentList,proto3" json:"departmentList"` + DepartmentDirectoryList []*common.Department `protobuf:"bytes,3,rep,name=departmentDirectoryList,proto3" json:"departmentDirectoryList"` +} + +func (x *GetSubDepartmentResp) Reset() { + *x = GetSubDepartmentResp{} + if protoimpl.UnsafeEnabled { + mi := &file_organization_organization_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetSubDepartmentResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSubDepartmentResp) ProtoMessage() {} + +func (x *GetSubDepartmentResp) ProtoReflect() protoreflect.Message { + mi := &file_organization_organization_proto_msgTypes[42] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSubDepartmentResp.ProtoReflect.Descriptor instead. +func (*GetSubDepartmentResp) Descriptor() ([]byte, []int) { + return file_organization_organization_proto_rawDescGZIP(), []int{42} +} + +func (x *GetSubDepartmentResp) GetDepartmentMemberList() []*common.DepartmentMember { + if x != nil { + return x.DepartmentMemberList + } + return nil +} + +func (x *GetSubDepartmentResp) GetDepartmentList() []*common.Department { + if x != nil { + return x.DepartmentList + } + return nil +} + +func (x *GetSubDepartmentResp) GetDepartmentDirectoryList() []*common.Department { + if x != nil { + return x.DepartmentDirectoryList + } + return nil +} + +type GetSearchDepartmentUserReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Keyword string `protobuf:"bytes,1,opt,name=keyword,proto3" json:"keyword"` + IsGetAllDepartment bool `protobuf:"varint,2,opt,name=IsGetAllDepartment,proto3" json:"IsGetAllDepartment"` +} + +func (x *GetSearchDepartmentUserReq) Reset() { + *x = GetSearchDepartmentUserReq{} + if protoimpl.UnsafeEnabled { + mi := &file_organization_organization_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetSearchDepartmentUserReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSearchDepartmentUserReq) ProtoMessage() {} + +func (x *GetSearchDepartmentUserReq) ProtoReflect() protoreflect.Message { + mi := &file_organization_organization_proto_msgTypes[43] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSearchDepartmentUserReq.ProtoReflect.Descriptor instead. +func (*GetSearchDepartmentUserReq) Descriptor() ([]byte, []int) { + return file_organization_organization_proto_rawDescGZIP(), []int{43} +} + +func (x *GetSearchDepartmentUserReq) GetKeyword() string { + if x != nil { + return x.Keyword + } + return "" +} + +func (x *GetSearchDepartmentUserReq) GetIsGetAllDepartment() bool { + if x != nil { + return x.IsGetAllDepartment + } + return false +} + +type GetSearchDepartmentUserOrganizationUser struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + OrganizationUser *common.OrganizationUser `protobuf:"bytes,1,opt,name=organizationUser,proto3" json:"organizationUser"` + DepartmentList []*common.Department `protobuf:"bytes,2,rep,name=departmentList,proto3" json:"departmentList"` + Position string `protobuf:"bytes,3,opt,name=position,proto3" json:"position"` +} + +func (x *GetSearchDepartmentUserOrganizationUser) Reset() { + *x = GetSearchDepartmentUserOrganizationUser{} + if protoimpl.UnsafeEnabled { + mi := &file_organization_organization_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetSearchDepartmentUserOrganizationUser) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSearchDepartmentUserOrganizationUser) ProtoMessage() {} + +func (x *GetSearchDepartmentUserOrganizationUser) ProtoReflect() protoreflect.Message { + mi := &file_organization_organization_proto_msgTypes[44] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSearchDepartmentUserOrganizationUser.ProtoReflect.Descriptor instead. +func (*GetSearchDepartmentUserOrganizationUser) Descriptor() ([]byte, []int) { + return file_organization_organization_proto_rawDescGZIP(), []int{44} +} + +func (x *GetSearchDepartmentUserOrganizationUser) GetOrganizationUser() *common.OrganizationUser { + if x != nil { + return x.OrganizationUser + } + return nil +} + +func (x *GetSearchDepartmentUserOrganizationUser) GetDepartmentList() []*common.Department { + if x != nil { + return x.DepartmentList + } + return nil +} + +func (x *GetSearchDepartmentUserOrganizationUser) GetPosition() string { + if x != nil { + return x.Position + } + return "" +} + +type GetSearchDepartmentUserResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DepartmentList []*common.Department `protobuf:"bytes,1,rep,name=departmentList,proto3" json:"departmentList"` + OrganizationUserList []*GetSearchDepartmentUserOrganizationUser `protobuf:"bytes,2,rep,name=organizationUserList,proto3" json:"organizationUserList"` +} + +func (x *GetSearchDepartmentUserResp) Reset() { + *x = GetSearchDepartmentUserResp{} + if protoimpl.UnsafeEnabled { + mi := &file_organization_organization_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetSearchDepartmentUserResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSearchDepartmentUserResp) ProtoMessage() {} + +func (x *GetSearchDepartmentUserResp) ProtoReflect() protoreflect.Message { + mi := &file_organization_organization_proto_msgTypes[45] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSearchDepartmentUserResp.ProtoReflect.Descriptor instead. +func (*GetSearchDepartmentUserResp) Descriptor() ([]byte, []int) { + return file_organization_organization_proto_rawDescGZIP(), []int{45} +} + +func (x *GetSearchDepartmentUserResp) GetDepartmentList() []*common.Department { + if x != nil { + return x.DepartmentList + } + return nil +} + +func (x *GetSearchDepartmentUserResp) GetOrganizationUserList() []*GetSearchDepartmentUserOrganizationUser { + if x != nil { + return x.OrganizationUserList + } + return nil +} + +type SortDepartmentListReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DepartmentID string `protobuf:"bytes,1,opt,name=departmentID,proto3" json:"departmentID"` + ParentID string `protobuf:"bytes,2,opt,name=parentID,proto3" json:"parentID"` + NextDepartmentID string `protobuf:"bytes,3,opt,name=nextDepartmentID,proto3" json:"nextDepartmentID"` +} + +func (x *SortDepartmentListReq) Reset() { + *x = SortDepartmentListReq{} + if protoimpl.UnsafeEnabled { + mi := &file_organization_organization_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SortDepartmentListReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SortDepartmentListReq) ProtoMessage() {} + +func (x *SortDepartmentListReq) ProtoReflect() protoreflect.Message { + mi := &file_organization_organization_proto_msgTypes[46] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SortDepartmentListReq.ProtoReflect.Descriptor instead. +func (*SortDepartmentListReq) Descriptor() ([]byte, []int) { + return file_organization_organization_proto_rawDescGZIP(), []int{46} +} + +func (x *SortDepartmentListReq) GetDepartmentID() string { + if x != nil { + return x.DepartmentID + } + return "" +} + +func (x *SortDepartmentListReq) GetParentID() string { + if x != nil { + return x.ParentID + } + return "" +} + +func (x *SortDepartmentListReq) GetNextDepartmentID() string { + if x != nil { + return x.NextDepartmentID + } + return "" +} + +type SortDepartmentListResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SortDepartmentListResp) Reset() { + *x = SortDepartmentListResp{} + if protoimpl.UnsafeEnabled { + mi := &file_organization_organization_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SortDepartmentListResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SortDepartmentListResp) ProtoMessage() {} + +func (x *SortDepartmentListResp) ProtoReflect() protoreflect.Message { + mi := &file_organization_organization_proto_msgTypes[47] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SortDepartmentListResp.ProtoReflect.Descriptor instead. +func (*SortDepartmentListResp) Descriptor() ([]byte, []int) { + return file_organization_organization_proto_rawDescGZIP(), []int{47} +} + +type SortOrganizationUserListReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DepartmentID string `protobuf:"bytes,1,opt,name=departmentID,proto3" json:"departmentID"` + UserID string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID"` + NextUserID string `protobuf:"bytes,3,opt,name=nextUserID,proto3" json:"nextUserID"` +} + +func (x *SortOrganizationUserListReq) Reset() { + *x = SortOrganizationUserListReq{} + if protoimpl.UnsafeEnabled { + mi := &file_organization_organization_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SortOrganizationUserListReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SortOrganizationUserListReq) ProtoMessage() {} + +func (x *SortOrganizationUserListReq) ProtoReflect() protoreflect.Message { + mi := &file_organization_organization_proto_msgTypes[48] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SortOrganizationUserListReq.ProtoReflect.Descriptor instead. +func (*SortOrganizationUserListReq) Descriptor() ([]byte, []int) { + return file_organization_organization_proto_rawDescGZIP(), []int{48} +} + +func (x *SortOrganizationUserListReq) GetDepartmentID() string { + if x != nil { + return x.DepartmentID + } + return "" +} + +func (x *SortOrganizationUserListReq) GetUserID() string { + if x != nil { + return x.UserID + } + return "" +} + +func (x *SortOrganizationUserListReq) GetNextUserID() string { + if x != nil { + return x.NextUserID + } + return "" +} + +type SortOrganizationUserListResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SortOrganizationUserListResp) Reset() { + *x = SortOrganizationUserListResp{} + if protoimpl.UnsafeEnabled { + mi := &file_organization_organization_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SortOrganizationUserListResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SortOrganizationUserListResp) ProtoMessage() {} + +func (x *SortOrganizationUserListResp) ProtoReflect() protoreflect.Message { + mi := &file_organization_organization_proto_msgTypes[49] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SortOrganizationUserListResp.ProtoReflect.Descriptor instead. +func (*SortOrganizationUserListResp) Descriptor() ([]byte, []int) { + return file_organization_organization_proto_rawDescGZIP(), []int{49} +} + +type GetDepartmentReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DepartmentID string `protobuf:"bytes,1,opt,name=departmentID,proto3" json:"departmentID"` +} + +func (x *GetDepartmentReq) Reset() { + *x = GetDepartmentReq{} + if protoimpl.UnsafeEnabled { + mi := &file_organization_organization_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetDepartmentReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDepartmentReq) ProtoMessage() {} + +func (x *GetDepartmentReq) ProtoReflect() protoreflect.Message { + mi := &file_organization_organization_proto_msgTypes[50] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetDepartmentReq.ProtoReflect.Descriptor instead. +func (*GetDepartmentReq) Descriptor() ([]byte, []int) { + return file_organization_organization_proto_rawDescGZIP(), []int{50} +} + +func (x *GetDepartmentReq) GetDepartmentID() string { + if x != nil { + return x.DepartmentID + } + return "" +} + +type GetDepartmentResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Department *common.Department `protobuf:"bytes,1,opt,name=department,proto3" json:"department"` +} + +func (x *GetDepartmentResp) Reset() { + *x = GetDepartmentResp{} + if protoimpl.UnsafeEnabled { + mi := &file_organization_organization_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetDepartmentResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDepartmentResp) ProtoMessage() {} + +func (x *GetDepartmentResp) ProtoReflect() protoreflect.Message { + mi := &file_organization_organization_proto_msgTypes[51] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetDepartmentResp.ProtoReflect.Descriptor instead. +func (*GetDepartmentResp) Descriptor() ([]byte, []int) { + return file_organization_organization_proto_rawDescGZIP(), []int{51} +} + +func (x *GetDepartmentResp) GetDepartment() *common.Department { + if x != nil { + return x.Department + } + return nil +} + +type CreateNewOrganizationMemberReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + OrganizationUser *common.OrganizationUser `protobuf:"bytes,1,opt,name=organizationUser,proto3" json:"organizationUser"` + DepartmentMemberList []*common.DepartmentMember `protobuf:"bytes,2,rep,name=departmentMemberList,proto3" json:"departmentMemberList"` + UserIdentity *common.UserIdentity `protobuf:"bytes,3,opt,name=userIdentity,proto3" json:"userIdentity"` +} + +func (x *CreateNewOrganizationMemberReq) Reset() { + *x = CreateNewOrganizationMemberReq{} + if protoimpl.UnsafeEnabled { + mi := &file_organization_organization_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateNewOrganizationMemberReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateNewOrganizationMemberReq) ProtoMessage() {} + +func (x *CreateNewOrganizationMemberReq) ProtoReflect() protoreflect.Message { + mi := &file_organization_organization_proto_msgTypes[52] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateNewOrganizationMemberReq.ProtoReflect.Descriptor instead. +func (*CreateNewOrganizationMemberReq) Descriptor() ([]byte, []int) { + return file_organization_organization_proto_rawDescGZIP(), []int{52} +} + +func (x *CreateNewOrganizationMemberReq) GetOrganizationUser() *common.OrganizationUser { + if x != nil { + return x.OrganizationUser + } + return nil +} + +func (x *CreateNewOrganizationMemberReq) GetDepartmentMemberList() []*common.DepartmentMember { + if x != nil { + return x.DepartmentMemberList + } + return nil +} + +func (x *CreateNewOrganizationMemberReq) GetUserIdentity() *common.UserIdentity { + if x != nil { + return x.UserIdentity + } + return nil +} + +type CreateNewOrganizationMemberResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *CreateNewOrganizationMemberResp) Reset() { + *x = CreateNewOrganizationMemberResp{} + if protoimpl.UnsafeEnabled { + mi := &file_organization_organization_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateNewOrganizationMemberResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateNewOrganizationMemberResp) ProtoMessage() {} + +func (x *CreateNewOrganizationMemberResp) ProtoReflect() protoreflect.Message { + mi := &file_organization_organization_proto_msgTypes[53] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateNewOrganizationMemberResp.ProtoReflect.Descriptor instead. +func (*CreateNewOrganizationMemberResp) Descriptor() ([]byte, []int) { + return file_organization_organization_proto_rawDescGZIP(), []int{53} +} + +type GetUserInfoReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"` +} + +func (x *GetUserInfoReq) Reset() { + *x = GetUserInfoReq{} + if protoimpl.UnsafeEnabled { + mi := &file_organization_organization_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetUserInfoReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetUserInfoReq) ProtoMessage() {} + +func (x *GetUserInfoReq) ProtoReflect() protoreflect.Message { + mi := &file_organization_organization_proto_msgTypes[54] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetUserInfoReq.ProtoReflect.Descriptor instead. +func (*GetUserInfoReq) Descriptor() ([]byte, []int) { + return file_organization_organization_proto_rawDescGZIP(), []int{54} +} + +func (x *GetUserInfoReq) GetUserID() string { + if x != nil { + return x.UserID + } + return "" +} + +type GetUserInfoResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + User *common.OrganizationUser `protobuf:"bytes,1,opt,name=user,proto3" json:"user"` +} + +func (x *GetUserInfoResp) Reset() { + *x = GetUserInfoResp{} + if protoimpl.UnsafeEnabled { + mi := &file_organization_organization_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetUserInfoResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetUserInfoResp) ProtoMessage() {} + +func (x *GetUserInfoResp) ProtoReflect() protoreflect.Message { + mi := &file_organization_organization_proto_msgTypes[55] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetUserInfoResp.ProtoReflect.Descriptor instead. +func (*GetUserInfoResp) Descriptor() ([]byte, []int) { + return file_organization_organization_proto_rawDescGZIP(), []int{55} +} + +func (x *GetUserInfoResp) GetUser() *common.OrganizationUser { + if x != nil { + return x.User + } + return nil +} + +type BatchImportUserDepartmentName struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + HierarchyName []string `protobuf:"bytes,1,rep,name=hierarchyName,proto3" json:"hierarchyName"` +} + +func (x *BatchImportUserDepartmentName) Reset() { + *x = BatchImportUserDepartmentName{} + if protoimpl.UnsafeEnabled { + mi := &file_organization_organization_proto_msgTypes[56] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BatchImportUserDepartmentName) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BatchImportUserDepartmentName) ProtoMessage() {} + +func (x *BatchImportUserDepartmentName) ProtoReflect() protoreflect.Message { + mi := &file_organization_organization_proto_msgTypes[56] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BatchImportUserDepartmentName.ProtoReflect.Descriptor instead. +func (*BatchImportUserDepartmentName) Descriptor() ([]byte, []int) { + return file_organization_organization_proto_rawDescGZIP(), []int{56} +} + +func (x *BatchImportUserDepartmentName) GetHierarchyName() []string { + if x != nil { + return x.HierarchyName + } + return nil +} + +type BatchImportUserDepartmentNamePosition struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + HierarchyName []string `protobuf:"bytes,1,rep,name=hierarchyName,proto3" json:"hierarchyName"` + Position string `protobuf:"bytes,2,opt,name=position,proto3" json:"position"` +} + +func (x *BatchImportUserDepartmentNamePosition) Reset() { + *x = BatchImportUserDepartmentNamePosition{} + if protoimpl.UnsafeEnabled { + mi := &file_organization_organization_proto_msgTypes[57] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BatchImportUserDepartmentNamePosition) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BatchImportUserDepartmentNamePosition) ProtoMessage() {} + +func (x *BatchImportUserDepartmentNamePosition) ProtoReflect() protoreflect.Message { + mi := &file_organization_organization_proto_msgTypes[57] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BatchImportUserDepartmentNamePosition.ProtoReflect.Descriptor instead. +func (*BatchImportUserDepartmentNamePosition) Descriptor() ([]byte, []int) { + return file_organization_organization_proto_rawDescGZIP(), []int{57} +} + +func (x *BatchImportUserDepartmentNamePosition) GetHierarchyName() []string { + if x != nil { + return x.HierarchyName + } + return nil +} + +func (x *BatchImportUserDepartmentNamePosition) GetPosition() string { + if x != nil { + return x.Position + } + return "" +} + +type BatchImportUser struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"` + Nickname string `protobuf:"bytes,2,opt,name=nickname,proto3" json:"nickname"` + EnglishName string `protobuf:"bytes,3,opt,name=englishName,proto3" json:"englishName"` + FaceURL string `protobuf:"bytes,4,opt,name=faceURL,proto3" json:"faceURL"` + Gender int32 `protobuf:"varint,5,opt,name=gender,proto3" json:"gender"` + Mobile string `protobuf:"bytes,6,opt,name=mobile,proto3" json:"mobile"` + Telephone string `protobuf:"bytes,7,opt,name=telephone,proto3" json:"telephone"` + Birth int64 `protobuf:"varint,8,opt,name=birth,proto3" json:"birth"` + Email string `protobuf:"bytes,9,opt,name=email,proto3" json:"email"` + Account string `protobuf:"bytes,10,opt,name=account,proto3" json:"account"` + Password string `protobuf:"bytes,11,opt,name=password,proto3" json:"password"` + UserDepartmentNameList []*BatchImportUserDepartmentNamePosition `protobuf:"bytes,12,rep,name=userDepartmentNameList,proto3" json:"userDepartmentNameList"` + Order int32 `protobuf:"varint,13,opt,name=order,proto3" json:"order"` + Status int32 `protobuf:"varint,14,opt,name=status,proto3" json:"status"` + AreaCode string `protobuf:"bytes,15,opt,name=areaCode,proto3" json:"areaCode"` + Station string `protobuf:"bytes,16,opt,name=station,proto3" json:"station"` +} + +func (x *BatchImportUser) Reset() { + *x = BatchImportUser{} + if protoimpl.UnsafeEnabled { + mi := &file_organization_organization_proto_msgTypes[58] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BatchImportUser) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BatchImportUser) ProtoMessage() {} + +func (x *BatchImportUser) ProtoReflect() protoreflect.Message { + mi := &file_organization_organization_proto_msgTypes[58] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BatchImportUser.ProtoReflect.Descriptor instead. +func (*BatchImportUser) Descriptor() ([]byte, []int) { + return file_organization_organization_proto_rawDescGZIP(), []int{58} +} + +func (x *BatchImportUser) GetUserID() string { + if x != nil { + return x.UserID + } + return "" +} + +func (x *BatchImportUser) GetNickname() string { + if x != nil { + return x.Nickname + } + return "" +} + +func (x *BatchImportUser) GetEnglishName() string { + if x != nil { + return x.EnglishName + } + return "" +} + +func (x *BatchImportUser) GetFaceURL() string { + if x != nil { + return x.FaceURL + } + return "" +} + +func (x *BatchImportUser) GetGender() int32 { + if x != nil { + return x.Gender + } + return 0 +} + +func (x *BatchImportUser) GetMobile() string { + if x != nil { + return x.Mobile + } + return "" +} + +func (x *BatchImportUser) GetTelephone() string { + if x != nil { + return x.Telephone + } + return "" +} + +func (x *BatchImportUser) GetBirth() int64 { + if x != nil { + return x.Birth + } + return 0 +} + +func (x *BatchImportUser) GetEmail() string { + if x != nil { + return x.Email + } + return "" +} + +func (x *BatchImportUser) GetAccount() string { + if x != nil { + return x.Account + } + return "" +} + +func (x *BatchImportUser) GetPassword() string { + if x != nil { + return x.Password + } + return "" +} + +func (x *BatchImportUser) GetUserDepartmentNameList() []*BatchImportUserDepartmentNamePosition { + if x != nil { + return x.UserDepartmentNameList + } + return nil +} + +func (x *BatchImportUser) GetOrder() int32 { + if x != nil { + return x.Order + } + return 0 +} + +func (x *BatchImportUser) GetStatus() int32 { + if x != nil { + return x.Status + } + return 0 +} + +func (x *BatchImportUser) GetAreaCode() string { + if x != nil { + return x.AreaCode + } + return "" +} + +func (x *BatchImportUser) GetStation() string { + if x != nil { + return x.Station + } + return "" +} + +type BatchImportDepartment struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DepartmentID string `protobuf:"bytes,1,opt,name=departmentID,proto3" json:"departmentID"` + FaceURL string `protobuf:"bytes,2,opt,name=faceURL,proto3" json:"faceURL"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name"` + ParentID string `protobuf:"bytes,4,opt,name=parentID,proto3" json:"parentID"` + Order int32 `protobuf:"varint,5,opt,name=order,proto3" json:"order"` + DepartmentType int32 `protobuf:"varint,6,opt,name=departmentType,proto3" json:"departmentType"` + RelatedGroupID string `protobuf:"bytes,7,opt,name=relatedGroupID,proto3" json:"relatedGroupID"` + ParentDepartmentName *BatchImportUserDepartmentName `protobuf:"bytes,11,opt,name=parentDepartmentName,proto3" json:"parentDepartmentName"` +} + +func (x *BatchImportDepartment) Reset() { + *x = BatchImportDepartment{} + if protoimpl.UnsafeEnabled { + mi := &file_organization_organization_proto_msgTypes[59] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BatchImportDepartment) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BatchImportDepartment) ProtoMessage() {} + +func (x *BatchImportDepartment) ProtoReflect() protoreflect.Message { + mi := &file_organization_organization_proto_msgTypes[59] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BatchImportDepartment.ProtoReflect.Descriptor instead. +func (*BatchImportDepartment) Descriptor() ([]byte, []int) { + return file_organization_organization_proto_rawDescGZIP(), []int{59} +} + +func (x *BatchImportDepartment) GetDepartmentID() string { + if x != nil { + return x.DepartmentID + } + return "" +} + +func (x *BatchImportDepartment) GetFaceURL() string { + if x != nil { + return x.FaceURL + } + return "" +} + +func (x *BatchImportDepartment) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *BatchImportDepartment) GetParentID() string { + if x != nil { + return x.ParentID + } + return "" +} + +func (x *BatchImportDepartment) GetOrder() int32 { + if x != nil { + return x.Order + } + return 0 +} + +func (x *BatchImportDepartment) GetDepartmentType() int32 { + if x != nil { + return x.DepartmentType + } + return 0 +} + +func (x *BatchImportDepartment) GetRelatedGroupID() string { + if x != nil { + return x.RelatedGroupID + } + return "" +} + +func (x *BatchImportDepartment) GetParentDepartmentName() *BatchImportUserDepartmentName { + if x != nil { + return x.ParentDepartmentName + } + return nil +} + +type BatchImportReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UserList []*BatchImportUser `protobuf:"bytes,1,rep,name=userList,proto3" json:"userList"` + DepartmentList []*BatchImportDepartment `protobuf:"bytes,2,rep,name=departmentList,proto3" json:"departmentList"` +} + +func (x *BatchImportReq) Reset() { + *x = BatchImportReq{} + if protoimpl.UnsafeEnabled { + mi := &file_organization_organization_proto_msgTypes[60] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BatchImportReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BatchImportReq) ProtoMessage() {} + +func (x *BatchImportReq) ProtoReflect() protoreflect.Message { + mi := &file_organization_organization_proto_msgTypes[60] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BatchImportReq.ProtoReflect.Descriptor instead. +func (*BatchImportReq) Descriptor() ([]byte, []int) { + return file_organization_organization_proto_rawDescGZIP(), []int{60} +} + +func (x *BatchImportReq) GetUserList() []*BatchImportUser { + if x != nil { + return x.UserList + } + return nil +} + +func (x *BatchImportReq) GetDepartmentList() []*BatchImportDepartment { + if x != nil { + return x.DepartmentList + } + return nil +} + +type BatchImportResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *BatchImportResp) Reset() { + *x = BatchImportResp{} + if protoimpl.UnsafeEnabled { + mi := &file_organization_organization_proto_msgTypes[61] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BatchImportResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BatchImportResp) ProtoMessage() {} + +func (x *BatchImportResp) ProtoReflect() protoreflect.Message { + mi := &file_organization_organization_proto_msgTypes[61] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BatchImportResp.ProtoReflect.Descriptor instead. +func (*BatchImportResp) Descriptor() ([]byte, []int) { + return file_organization_organization_proto_rawDescGZIP(), []int{61} +} + +type MoveUserDepartment struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"` + DepartmentID string `protobuf:"bytes,2,opt,name=departmentID,proto3" json:"departmentID"` + CurrentDepartmentID string `protobuf:"bytes,3,opt,name=currentDepartmentID,proto3" json:"currentDepartmentID"` + Position string `protobuf:"bytes,4,opt,name=position,proto3" json:"position"` + Leader int32 `protobuf:"varint,5,opt,name=leader,proto3" json:"leader"` + Status int32 `protobuf:"varint,6,opt,name=status,proto3" json:"status"` + EntryTime int64 `protobuf:"varint,7,opt,name=entryTime,proto3" json:"entryTime"` + TerminationTime int64 `protobuf:"varint,8,opt,name=terminationTime,proto3" json:"terminationTime"` + Order int32 `protobuf:"varint,9,opt,name=order,proto3" json:"order"` +} + +func (x *MoveUserDepartment) Reset() { + *x = MoveUserDepartment{} + if protoimpl.UnsafeEnabled { + mi := &file_organization_organization_proto_msgTypes[62] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MoveUserDepartment) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MoveUserDepartment) ProtoMessage() {} + +func (x *MoveUserDepartment) ProtoReflect() protoreflect.Message { + mi := &file_organization_organization_proto_msgTypes[62] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MoveUserDepartment.ProtoReflect.Descriptor instead. +func (*MoveUserDepartment) Descriptor() ([]byte, []int) { + return file_organization_organization_proto_rawDescGZIP(), []int{62} +} + +func (x *MoveUserDepartment) GetUserID() string { + if x != nil { + return x.UserID + } + return "" +} + +func (x *MoveUserDepartment) GetDepartmentID() string { + if x != nil { + return x.DepartmentID + } + return "" +} + +func (x *MoveUserDepartment) GetCurrentDepartmentID() string { + if x != nil { + return x.CurrentDepartmentID + } + return "" +} + +func (x *MoveUserDepartment) GetPosition() string { + if x != nil { + return x.Position + } + return "" +} + +func (x *MoveUserDepartment) GetLeader() int32 { + if x != nil { + return x.Leader + } + return 0 +} + +func (x *MoveUserDepartment) GetStatus() int32 { + if x != nil { + return x.Status + } + return 0 +} + +func (x *MoveUserDepartment) GetEntryTime() int64 { + if x != nil { + return x.EntryTime + } + return 0 +} + +func (x *MoveUserDepartment) GetTerminationTime() int64 { + if x != nil { + return x.TerminationTime + } + return 0 +} + +func (x *MoveUserDepartment) GetOrder() int32 { + if x != nil { + return x.Order + } + return 0 +} + +type MoveUserDepartmentReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + MoveUserDepartmentList []*MoveUserDepartment `protobuf:"bytes,1,rep,name=moveUserDepartmentList,proto3" json:"moveUserDepartmentList"` +} + +func (x *MoveUserDepartmentReq) Reset() { + *x = MoveUserDepartmentReq{} + if protoimpl.UnsafeEnabled { + mi := &file_organization_organization_proto_msgTypes[63] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MoveUserDepartmentReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MoveUserDepartmentReq) ProtoMessage() {} + +func (x *MoveUserDepartmentReq) ProtoReflect() protoreflect.Message { + mi := &file_organization_organization_proto_msgTypes[63] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MoveUserDepartmentReq.ProtoReflect.Descriptor instead. +func (*MoveUserDepartmentReq) Descriptor() ([]byte, []int) { + return file_organization_organization_proto_rawDescGZIP(), []int{63} +} + +func (x *MoveUserDepartmentReq) GetMoveUserDepartmentList() []*MoveUserDepartment { + if x != nil { + return x.MoveUserDepartmentList + } + return nil +} + +type MoveUserDepartmentResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MoveUserDepartmentResp) Reset() { + *x = MoveUserDepartmentResp{} + if protoimpl.UnsafeEnabled { + mi := &file_organization_organization_proto_msgTypes[64] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MoveUserDepartmentResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MoveUserDepartmentResp) ProtoMessage() {} + +func (x *MoveUserDepartmentResp) ProtoReflect() protoreflect.Message { + mi := &file_organization_organization_proto_msgTypes[64] + 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 MoveUserDepartmentResp.ProtoReflect.Descriptor instead. +func (*MoveUserDepartmentResp) Descriptor() ([]byte, []int) { + return file_organization_organization_proto_rawDescGZIP(), []int{64} +} + +type GetUserFullListReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PageNumber int32 `protobuf:"varint,1,opt,name=pageNumber,proto3" json:"pageNumber"` + ShowNumber int32 `protobuf:"varint,2,opt,name=showNumber,proto3" json:"showNumber"` + UserIDList []string `protobuf:"bytes,3,rep,name=userIDList,proto3" json:"userIDList"` +} + +func (x *GetUserFullListReq) Reset() { + *x = GetUserFullListReq{} + if protoimpl.UnsafeEnabled { + mi := &file_organization_organization_proto_msgTypes[65] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetUserFullListReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetUserFullListReq) ProtoMessage() {} + +func (x *GetUserFullListReq) ProtoReflect() protoreflect.Message { + mi := &file_organization_organization_proto_msgTypes[65] + 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 GetUserFullListReq.ProtoReflect.Descriptor instead. +func (*GetUserFullListReq) Descriptor() ([]byte, []int) { + return file_organization_organization_proto_rawDescGZIP(), []int{65} +} + +func (x *GetUserFullListReq) GetPageNumber() int32 { + if x != nil { + return x.PageNumber + } + return 0 +} + +func (x *GetUserFullListReq) GetShowNumber() int32 { + if x != nil { + return x.ShowNumber + } + return 0 +} + +func (x *GetUserFullListReq) GetUserIDList() []string { + if x != nil { + return x.UserIDList + } + return nil +} + +type GetUserFullListResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + OrganizationUserList []*common.OrganizationUser `protobuf:"bytes,1,rep,name=organizationUserList,proto3" json:"organizationUserList"` + Total int32 `protobuf:"varint,2,opt,name=total,proto3" json:"total"` +} + +func (x *GetUserFullListResp) Reset() { + *x = GetUserFullListResp{} + if protoimpl.UnsafeEnabled { + mi := &file_organization_organization_proto_msgTypes[66] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetUserFullListResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetUserFullListResp) ProtoMessage() {} + +func (x *GetUserFullListResp) ProtoReflect() protoreflect.Message { + mi := &file_organization_organization_proto_msgTypes[66] + 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 GetUserFullListResp.ProtoReflect.Descriptor instead. +func (*GetUserFullListResp) Descriptor() ([]byte, []int) { + return file_organization_organization_proto_rawDescGZIP(), []int{66} +} + +func (x *GetUserFullListResp) GetOrganizationUserList() []*common.OrganizationUser { + if x != nil { + return x.OrganizationUserList + } + return nil +} + +func (x *GetUserFullListResp) GetTotal() int32 { + if x != nil { + return x.Total + } + return 0 +} + +type SearchUsersFullInfoReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Operation *common.Operation `protobuf:"bytes,1,opt,name=operation,proto3" json:"operation"` + Pagination *common.RequestPagination `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination"` + UserPublicInfo *common.UserPublicInfo `protobuf:"bytes,3,opt,name=userPublicInfo,proto3" json:"userPublicInfo"` + Content string `protobuf:"bytes,4,opt,name=content,proto3" json:"content"` +} + +func (x *SearchUsersFullInfoReq) Reset() { + *x = SearchUsersFullInfoReq{} + if protoimpl.UnsafeEnabled { + mi := &file_organization_organization_proto_msgTypes[67] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SearchUsersFullInfoReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SearchUsersFullInfoReq) ProtoMessage() {} + +func (x *SearchUsersFullInfoReq) ProtoReflect() protoreflect.Message { + mi := &file_organization_organization_proto_msgTypes[67] + 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 SearchUsersFullInfoReq.ProtoReflect.Descriptor instead. +func (*SearchUsersFullInfoReq) Descriptor() ([]byte, []int) { + return file_organization_organization_proto_rawDescGZIP(), []int{67} +} + +func (x *SearchUsersFullInfoReq) GetOperation() *common.Operation { + if x != nil { + return x.Operation + } + return nil +} + +func (x *SearchUsersFullInfoReq) GetPagination() *common.RequestPagination { + if x != nil { + return x.Pagination + } + return nil +} + +func (x *SearchUsersFullInfoReq) GetUserPublicInfo() *common.UserPublicInfo { + if x != nil { + return x.UserPublicInfo + } + return nil +} + +func (x *SearchUsersFullInfoReq) GetContent() string { + if x != nil { + return x.Content + } + return "" +} + +type SearchUsersFullInfoResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + OrganizationUserList []*common.OrganizationUser `protobuf:"bytes,1,rep,name=organizationUserList,proto3" json:"organizationUserList"` + Total int32 `protobuf:"varint,2,opt,name=total,proto3" json:"total"` +} + +func (x *SearchUsersFullInfoResp) Reset() { + *x = SearchUsersFullInfoResp{} + if protoimpl.UnsafeEnabled { + mi := &file_organization_organization_proto_msgTypes[68] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SearchUsersFullInfoResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SearchUsersFullInfoResp) ProtoMessage() {} + +func (x *SearchUsersFullInfoResp) ProtoReflect() protoreflect.Message { + mi := &file_organization_organization_proto_msgTypes[68] + 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 SearchUsersFullInfoResp.ProtoReflect.Descriptor instead. +func (*SearchUsersFullInfoResp) Descriptor() ([]byte, []int) { + return file_organization_organization_proto_rawDescGZIP(), []int{68} +} + +func (x *SearchUsersFullInfoResp) GetOrganizationUserList() []*common.OrganizationUser { + if x != nil { + return x.OrganizationUserList + } + return nil +} + +func (x *SearchUsersFullInfoResp) GetTotal() int32 { + if x != nil { + return x.Total + } + return 0 +} + +var File_organization_organization_proto protoreflect.FileDescriptor + +var file_organization_organization_proto_rawDesc = []byte{ + 0x0a, 0x1f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6f, + 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x17, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x6f, 0x72, + 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x13, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0x5c, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, + 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x12, 0x45, 0x0a, 0x0e, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, + 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, + 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0e, 0x64, + 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x5d, 0x0a, + 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x45, 0x0a, 0x0e, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, + 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, + 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2e, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0e, 0x64, 0x65, + 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x5c, 0x0a, 0x13, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, + 0x52, 0x65, 0x71, 0x12, 0x45, 0x0a, 0x0e, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, + 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x4f, 0x70, + 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0e, 0x64, 0x65, 0x70, 0x61, + 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x16, 0x0a, 0x14, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x22, 0x1e, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, + 0x65, 0x71, 0x22, 0xa6, 0x01, 0x0a, 0x0e, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, + 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3d, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, + 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x4f, 0x70, 0x65, 0x6e, + 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x44, 0x65, + 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, + 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x55, 0x0a, 0x11, 0x73, 0x75, 0x62, 0x44, 0x65, 0x70, 0x61, 0x72, + 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x27, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x6f, 0x72, 0x67, + 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, + 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x11, 0x73, 0x75, 0x62, 0x44, 0x65, 0x70, + 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x70, 0x0a, 0x1d, 0x47, + 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, + 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4f, 0x0a, 0x0e, + 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, + 0x74, 0x2e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x44, + 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0e, 0x64, + 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x41, 0x0a, + 0x13, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, + 0x74, 0x52, 0x65, 0x71, 0x12, 0x2a, 0x0a, 0x10, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, + 0x6e, 0x74, 0x49, 0x44, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, + 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x4c, 0x69, 0x73, 0x74, + 0x22, 0x16, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, + 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x42, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x44, + 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, + 0x44, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x12, 0x22, 0x0a, 0x0c, 0x64, 0x65, 0x70, 0x61, + 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, + 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x22, 0x43, 0x0a, 0x1d, + 0x47, 0x65, 0x74, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x49, 0x44, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x22, 0x0a, + 0x0c, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x4c, 0x69, 0x73, + 0x74, 0x22, 0x6c, 0x0a, 0x19, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x4f, + 0x0a, 0x10, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x73, + 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, + 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4f, 0x72, 0x67, + 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x10, 0x6f, + 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x22, + 0x1c, 0x0a, 0x1a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x22, 0x6c, 0x0a, + 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x4f, 0x0a, 0x10, 0x6f, 0x72, + 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, + 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x10, 0x6f, 0x72, 0x67, 0x61, 0x6e, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x22, 0x1c, 0x0a, 0x1a, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x22, 0x6c, 0x0a, 0x19, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x6d, + 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x4f, 0x0a, 0x10, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, + 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x23, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x4d, + 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x10, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, + 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x1c, 0x0a, 0x1a, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, + 0x72, 0x52, 0x65, 0x73, 0x70, 0x22, 0x30, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, + 0x49, 0x6e, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x12, + 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x22, 0x6a, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x55, 0x73, + 0x65, 0x72, 0x49, 0x6e, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x12, 0x4f, 0x0a, 0x10, 0x75, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x44, 0x65, 0x70, 0x61, + 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x4f, + 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, + 0x74, 0x52, 0x10, 0x75, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, + 0x65, 0x6e, 0x74, 0x22, 0x6c, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, + 0x72, 0x49, 0x6e, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, + 0x12, 0x4f, 0x0a, 0x10, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x65, + 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x4f, 0x70, 0x65, + 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x44, + 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, + 0x10, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, + 0x72, 0x22, 0x1c, 0x0a, 0x1a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, + 0x6e, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, + 0x57, 0x0a, 0x19, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x44, + 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, + 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, + 0x65, 0x72, 0x49, 0x44, 0x12, 0x22, 0x0a, 0x0c, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, + 0x6e, 0x74, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x70, 0x61, + 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x22, 0x1c, 0x0a, 0x1a, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, + 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x33, 0x0a, 0x19, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, + 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x22, 0x1c, 0x0a, 0x1a, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x22, 0x50, 0x0a, 0x22, 0x47, 0x65, 0x74, + 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, + 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x12, + 0x2a, 0x0a, 0x10, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x4c, + 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x64, 0x65, 0x70, 0x61, 0x72, + 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x47, 0x0a, 0x23, 0x47, + 0x65, 0x74, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x6c, 0x61, + 0x74, 0x65, 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x12, 0x20, 0x0a, 0x0b, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x4c, 0x69, 0x73, + 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, + 0x4c, 0x69, 0x73, 0x74, 0x22, 0x3a, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, + 0x6e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, + 0x12, 0x1e, 0x0a, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x4c, 0x69, 0x73, 0x74, + 0x22, 0x6e, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x4f, 0x72, 0x67, + 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x51, 0x0a, + 0x11, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x73, 0x65, + 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, + 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4f, 0x72, 0x67, + 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x11, 0x6f, + 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x73, + 0x22, 0x1c, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x4f, + 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x22, 0xd9, + 0x02, 0x0a, 0x14, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x65, 0x6f, 0x70, 0x6c, + 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x70, + 0x65, 0x6f, 0x70, 0x6c, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x41, 0x0a, 0x04, 0x6c, + 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x4f, 0x70, 0x65, 0x6e, + 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, + 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x22, + 0x0a, 0x0c, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, + 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x61, 0x63, 0x65, 0x55, 0x52, 0x4c, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x66, 0x61, 0x63, 0x65, 0x55, 0x52, 0x4c, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x12, 0x14, 0x0a, 0x05, + 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6f, 0x72, 0x64, + 0x65, 0x72, 0x12, 0x26, 0x0a, 0x0e, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, + 0x54, 0x79, 0x70, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x64, 0x65, 0x70, 0x61, + 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x65, 0x78, + 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x65, 0x78, 0x22, 0x60, 0x0a, 0x1b, 0x47, 0x65, + 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x41, 0x0a, 0x04, 0x6c, 0x69, 0x73, + 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, + 0x43, 0x68, 0x61, 0x74, 0x2e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, + 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x22, 0x39, 0x0a, 0x17, + 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x49, 0x6e, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, + 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x12, 0x1e, 0x0a, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x49, + 0x44, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x75, 0x73, 0x65, + 0x72, 0x49, 0x44, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x53, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x55, 0x73, + 0x65, 0x72, 0x73, 0x49, 0x6e, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x12, 0x37, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x23, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x44, 0x65, 0x70, 0x61, + 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x22, 0x80, 0x02, 0x0a, + 0x14, 0x47, 0x65, 0x74, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, + 0x73, 0x74, 0x52, 0x65, 0x71, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x4e, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x68, 0x6f, 0x77, 0x4e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x73, 0x68, 0x6f, 0x77, 0x4e, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x65, 0x78, 0x74, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x65, 0x78, 0x74, 0x12, 0x44, 0x0a, 0x05, 0x73, 0x6f, 0x72, + 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, + 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, + 0x4c, 0x69, 0x73, 0x74, 0x53, 0x6f, 0x72, 0x74, 0x52, 0x05, 0x73, 0x6f, 0x72, 0x74, 0x73, 0x12, + 0x2a, 0x0a, 0x10, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x4c, + 0x69, 0x73, 0x74, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x64, 0x65, 0x70, 0x61, 0x72, + 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x06, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x0c, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x22, + 0x41, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, + 0x4c, 0x69, 0x73, 0x74, 0x53, 0x6f, 0x72, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x12, + 0x0a, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x72, 0x75, + 0x6c, 0x65, 0x22, 0x6e, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, + 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3f, 0x0a, 0x08, 0x75, + 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, + 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, + 0x6e, 0x74, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, + 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x54, 0x6f, 0x74, + 0x61, 0x6c, 0x22, 0x59, 0x0a, 0x12, 0x53, 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x43, 0x0a, 0x0c, 0x6f, 0x72, 0x67, 0x61, + 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, + 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x15, 0x0a, + 0x13, 0x53, 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x73, 0x70, 0x22, 0x14, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x22, 0x5a, 0x0a, 0x13, 0x47, 0x65, + 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x12, 0x43, 0x0a, 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, + 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4f, 0x72, 0x67, 0x61, + 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, + 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x39, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, + 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x12, 0x22, 0x0a, + 0x0c, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x49, + 0x44, 0x22, 0x8f, 0x02, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x44, 0x65, 0x70, 0x61, + 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x57, 0x0a, 0x14, 0x64, 0x65, + 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x4c, 0x69, + 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, + 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x44, 0x65, 0x70, + 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x14, 0x64, + 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x4c, + 0x69, 0x73, 0x74, 0x12, 0x45, 0x0a, 0x0e, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, + 0x74, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x4f, 0x70, + 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0e, 0x64, 0x65, 0x70, 0x61, + 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x57, 0x0a, 0x17, 0x64, 0x65, + 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x79, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x4f, 0x70, + 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x17, 0x64, 0x65, 0x70, 0x61, + 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x4c, + 0x69, 0x73, 0x74, 0x22, 0x66, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, + 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, + 0x71, 0x12, 0x18, 0x0a, 0x07, 0x6b, 0x65, 0x79, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x2e, 0x0a, 0x12, 0x49, + 0x73, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x49, 0x73, 0x47, 0x65, 0x74, 0x41, 0x6c, + 0x6c, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0xdd, 0x01, 0x0a, 0x27, + 0x47, 0x65, 0x74, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, + 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x12, 0x4f, 0x0a, 0x10, 0x6f, 0x72, 0x67, 0x61, 0x6e, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x23, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x10, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x12, 0x45, 0x0a, 0x0e, 0x64, 0x65, 0x70, 0x61, + 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x1d, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, + 0x0e, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x12, + 0x1a, 0x0a, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xda, 0x01, 0x0a, 0x1b, + 0x47, 0x65, 0x74, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, + 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x45, 0x0a, 0x0e, 0x64, + 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, + 0x6e, 0x74, 0x52, 0x0e, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, + 0x73, 0x74, 0x12, 0x74, 0x0a, 0x14, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x40, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x6f, 0x72, + 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, + 0x61, 0x72, 0x63, 0x68, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x55, 0x73, + 0x65, 0x72, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x73, + 0x65, 0x72, 0x52, 0x14, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x83, 0x01, 0x0a, 0x15, 0x53, 0x6f, 0x72, + 0x74, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, + 0x65, 0x71, 0x12, 0x22, 0x0a, 0x0c, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, + 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, + 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x49, 0x44, 0x12, 0x2a, 0x0a, 0x10, 0x6e, 0x65, 0x78, 0x74, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, + 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6e, 0x65, + 0x78, 0x74, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x22, 0x18, + 0x0a, 0x16, 0x53, 0x6f, 0x72, 0x74, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, + 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x79, 0x0a, 0x1b, 0x53, 0x6f, 0x72, 0x74, + 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, + 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x12, 0x22, 0x0a, 0x0c, 0x64, 0x65, 0x70, 0x61, 0x72, + 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, + 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x12, 0x16, 0x0a, 0x06, 0x75, + 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, + 0x72, 0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a, 0x6e, 0x65, 0x78, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, + 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6e, 0x65, 0x78, 0x74, 0x55, 0x73, 0x65, + 0x72, 0x49, 0x44, 0x22, 0x1e, 0x0a, 0x1c, 0x53, 0x6f, 0x72, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x22, 0x36, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, + 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x12, 0x22, 0x0a, 0x0c, 0x64, 0x65, 0x70, 0x61, 0x72, + 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, + 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x22, 0x52, 0x0a, 0x11, 0x47, + 0x65, 0x74, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x12, 0x3d, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, + 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, + 0x65, 0x6e, 0x74, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x22, + 0x8f, 0x02, 0x0a, 0x1e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x65, 0x77, 0x4f, 0x72, 0x67, + 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, + 0x65, 0x71, 0x12, 0x4f, 0x0a, 0x10, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x4f, + 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x73, 0x65, + 0x72, 0x52, 0x10, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, + 0x73, 0x65, 0x72, 0x12, 0x57, 0x0a, 0x14, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, + 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x23, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, + 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x14, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, + 0x6e, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x43, 0x0a, 0x0c, + 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x74, 0x79, 0x52, 0x0c, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, + 0x79, 0x22, 0x21, 0x0a, 0x1f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x65, 0x77, 0x4f, 0x72, + 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, + 0x52, 0x65, 0x73, 0x70, 0x22, 0x28, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, + 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x22, 0x4a, + 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, + 0x70, 0x12, 0x37, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x23, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x45, 0x0a, 0x1d, 0x42, 0x61, + 0x74, 0x63, 0x68, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x55, 0x73, 0x65, 0x72, 0x44, 0x65, 0x70, + 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x68, + 0x69, 0x65, 0x72, 0x61, 0x72, 0x63, 0x68, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x0d, 0x68, 0x69, 0x65, 0x72, 0x61, 0x72, 0x63, 0x68, 0x79, 0x4e, 0x61, 0x6d, + 0x65, 0x22, 0x69, 0x0a, 0x25, 0x42, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, + 0x55, 0x73, 0x65, 0x72, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x4e, 0x61, + 0x6d, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x24, 0x0a, 0x0d, 0x68, 0x69, + 0x65, 0x72, 0x61, 0x72, 0x63, 0x68, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x0d, 0x68, 0x69, 0x65, 0x72, 0x61, 0x72, 0x63, 0x68, 0x79, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x8d, 0x04, 0x0a, + 0x0f, 0x42, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x55, 0x73, 0x65, 0x72, + 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x69, 0x63, 0x6b, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x69, 0x63, 0x6b, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x65, 0x6e, 0x67, 0x6c, 0x69, 0x73, 0x68, 0x4e, + 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x65, 0x6e, 0x67, 0x6c, 0x69, + 0x73, 0x68, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x61, 0x63, 0x65, 0x55, 0x52, + 0x4c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x66, 0x61, 0x63, 0x65, 0x55, 0x52, 0x4c, + 0x12, 0x16, 0x0a, 0x06, 0x67, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x06, 0x67, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x6f, 0x62, 0x69, + 0x6c, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x6f, 0x62, 0x69, 0x6c, 0x65, + 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x14, + 0x0a, 0x05, 0x62, 0x69, 0x72, 0x74, 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x62, + 0x69, 0x72, 0x74, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x09, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, + 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, + 0x12, 0x76, 0x0a, 0x16, 0x75, 0x73, 0x65, 0x72, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, + 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x3e, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x6f, 0x72, + 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, + 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x55, 0x73, 0x65, 0x72, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, + 0x6d, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x16, 0x75, 0x73, 0x65, 0x72, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, + 0x4e, 0x61, 0x6d, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, + 0x72, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x16, + 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x72, 0x65, 0x61, 0x43, 0x6f, + 0x64, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x72, 0x65, 0x61, 0x43, 0x6f, + 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x10, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xd7, 0x02, 0x0a, + 0x15, 0x42, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x44, 0x65, 0x70, 0x61, + 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, + 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, + 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x61, + 0x63, 0x65, 0x55, 0x52, 0x4c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x66, 0x61, 0x63, + 0x65, 0x55, 0x52, 0x4c, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x49, 0x44, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x49, 0x44, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x26, 0x0a, 0x0e, 0x64, 0x65, + 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x0e, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x49, 0x44, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x6c, 0x61, + 0x74, 0x65, 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x12, 0x6a, 0x0a, 0x14, 0x70, 0x61, + 0x72, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x4e, 0x61, + 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, + 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x55, 0x73, + 0x65, 0x72, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, + 0x52, 0x14, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, + 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xae, 0x01, 0x0a, 0x0e, 0x42, 0x61, 0x74, 0x63, 0x68, + 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x12, 0x44, 0x0a, 0x08, 0x75, 0x73, 0x65, + 0x72, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x4f, 0x70, + 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6d, 0x70, 0x6f, 0x72, + 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, + 0x56, 0x0a, 0x0e, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, + 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, + 0x43, 0x68, 0x61, 0x74, 0x2e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x44, 0x65, 0x70, + 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0e, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, + 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x11, 0x0a, 0x0f, 0x42, 0x61, 0x74, 0x63, 0x68, + 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0xac, 0x02, 0x0a, 0x12, 0x4d, + 0x6f, 0x76, 0x65, 0x55, 0x73, 0x65, 0x72, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, + 0x74, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x22, 0x0a, 0x0c, 0x64, 0x65, 0x70, + 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0c, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x12, 0x30, 0x0a, + 0x13, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, + 0x6e, 0x74, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x63, 0x75, 0x72, 0x72, + 0x65, 0x6e, 0x74, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x12, + 0x1a, 0x0a, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x6c, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6c, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x65, + 0x6e, 0x74, 0x72, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, + 0x65, 0x6e, 0x74, 0x72, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x74, 0x65, 0x72, + 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x0f, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, + 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x22, 0x7c, 0x0a, 0x15, 0x4d, 0x6f, 0x76, + 0x65, 0x55, 0x73, 0x65, 0x72, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, + 0x65, 0x71, 0x12, 0x63, 0x0a, 0x16, 0x6d, 0x6f, 0x76, 0x65, 0x55, 0x73, 0x65, 0x72, 0x44, 0x65, + 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, + 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x6f, 0x76, + 0x65, 0x55, 0x73, 0x65, 0x72, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, + 0x16, 0x6d, 0x6f, 0x76, 0x65, 0x55, 0x73, 0x65, 0x72, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, + 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x18, 0x0a, 0x16, 0x4d, 0x6f, 0x76, 0x65, 0x55, + 0x73, 0x65, 0x72, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x22, 0x74, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c, + 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x4e, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x70, 0x61, 0x67, + 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x68, 0x6f, 0x77, 0x4e, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x73, 0x68, 0x6f, + 0x77, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x49, + 0x44, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x75, 0x73, 0x65, + 0x72, 0x49, 0x44, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x84, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x55, + 0x73, 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, + 0x57, 0x0a, 0x14, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, + 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, + 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x73, + 0x65, 0x72, 0x52, 0x14, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, + 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x22, 0xff, + 0x01, 0x0a, 0x16, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, 0x73, 0x46, 0x75, + 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x12, 0x3a, 0x0a, 0x09, 0x6f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x4f, + 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x6f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x44, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x4f, 0x70, 0x65, 0x6e, + 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x49, 0x0a, 0x0e, 0x75, + 0x73, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6c, + 0x69, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0e, 0x75, 0x73, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6c, + 0x69, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, + 0x22, 0x88, 0x01, 0x0a, 0x17, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, 0x73, + 0x46, 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x57, 0x0a, 0x14, + 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, + 0x4c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x4f, 0x70, 0x65, + 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4f, + 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x52, + 0x14, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x73, 0x65, + 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x32, 0xe7, 0x17, 0x0a, 0x0c, + 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x6f, 0x0a, 0x10, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, + 0x12, 0x2c, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x6f, 0x72, + 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x2d, + 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x6f, 0x72, 0x67, 0x61, + 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, + 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x6f, 0x0a, + 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, + 0x74, 0x12, 0x2c, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x6f, + 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a, + 0x2d, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x6f, 0x72, 0x67, + 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x8a, + 0x01, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x35, 0x2e, 0x4f, + 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, + 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, + 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, + 0x52, 0x65, 0x71, 0x1a, 0x36, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, + 0x2e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, + 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x70, + 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x6f, 0x0a, 0x10, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x12, + 0x2c, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x6f, 0x72, 0x67, + 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x2d, 0x2e, + 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x6f, 0x72, 0x67, 0x61, 0x6e, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x65, + 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x66, 0x0a, 0x0d, + 0x47, 0x65, 0x74, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x29, 0x2e, + 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x6f, 0x72, 0x67, 0x61, 0x6e, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x70, 0x61, 0x72, + 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x2a, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, + 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x12, 0x81, 0x01, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, + 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x12, + 0x32, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x6f, 0x72, 0x67, + 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, + 0x52, 0x65, 0x71, 0x1a, 0x33, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, + 0x2e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x81, 0x01, 0x0a, 0x16, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, + 0x73, 0x65, 0x72, 0x12, 0x32, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, + 0x2e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x33, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, + 0x43, 0x68, 0x61, 0x74, 0x2e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x81, 0x01, 0x0a, + 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x12, 0x32, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, + 0x43, 0x68, 0x61, 0x74, 0x2e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x33, 0x2e, 0x4f, 0x70, + 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, + 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, + 0x12, 0x81, 0x01, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x70, 0x61, 0x72, + 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x32, 0x2e, 0x4f, 0x70, + 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x70, 0x61, + 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, + 0x33, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x6f, 0x72, 0x67, + 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, + 0x52, 0x65, 0x73, 0x70, 0x12, 0x78, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, + 0x6e, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x2f, 0x2e, 0x4f, 0x70, + 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x44, + 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x30, 0x2e, 0x4f, + 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, + 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, + 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x81, + 0x01, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x44, + 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x32, 0x2e, 0x4f, 0x70, 0x65, 0x6e, + 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, + 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x33, 0x2e, + 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x6f, 0x72, 0x67, 0x61, 0x6e, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, + 0x65, 0x72, 0x49, 0x6e, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x12, 0x81, 0x01, 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, + 0x72, 0x49, 0x6e, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x32, 0x2e, + 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x6f, 0x72, 0x67, 0x61, 0x6e, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, + 0x65, 0x72, 0x49, 0x6e, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, + 0x71, 0x1a, 0x33, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x6f, + 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, + 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x72, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x53, 0x65, 0x61, + 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x2d, 0x2e, 0x4f, 0x70, + 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, + 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x2e, 0x2e, 0x4f, 0x70, 0x65, + 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, 0x73, + 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x6c, 0x0a, 0x0f, 0x53, 0x65, + 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x2e, + 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x6f, 0x72, 0x67, 0x61, 0x6e, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x2c, 0x2e, 0x4f, 0x70, 0x65, + 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x6c, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x4f, + 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x2e, 0x4f, 0x70, + 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x2c, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, + 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x6f, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, + 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x2c, 0x2e, 0x4f, 0x70, 0x65, + 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x44, 0x65, 0x70, 0x61, 0x72, + 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x2d, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, + 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, + 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x84, 0x01, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x53, + 0x65, 0x61, 0x72, 0x63, 0x68, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x55, + 0x73, 0x65, 0x72, 0x12, 0x33, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, + 0x2e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, + 0x74, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, + 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x34, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, + 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x44, 0x65, 0x70, 0x61, + 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x75, + 0x0a, 0x12, 0x53, 0x6f, 0x72, 0x74, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, + 0x4c, 0x69, 0x73, 0x74, 0x12, 0x2e, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, + 0x74, 0x2e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, + 0x6f, 0x72, 0x74, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, + 0x74, 0x52, 0x65, 0x71, 0x1a, 0x2f, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, + 0x74, 0x2e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, + 0x6f, 0x72, 0x74, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x87, 0x01, 0x0a, 0x18, 0x53, 0x6f, 0x72, 0x74, 0x4f, 0x72, + 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, + 0x73, 0x74, 0x12, 0x34, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, + 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x6f, 0x72, + 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x73, 0x65, + 0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x35, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, + 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x53, 0x6f, 0x72, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, + 0x90, 0x01, 0x0a, 0x1b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x65, 0x77, 0x4f, 0x72, 0x67, + 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, + 0x37, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x6f, 0x72, 0x67, + 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x4e, 0x65, 0x77, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, + 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x38, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, + 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x65, 0x77, 0x4f, 0x72, 0x67, 0x61, + 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, + 0x73, 0x70, 0x12, 0x60, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, + 0x6f, 0x12, 0x27, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x6f, + 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x55, + 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x28, 0x2e, 0x4f, 0x70, 0x65, + 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x65, 0x73, 0x70, 0x12, 0x60, 0x0a, 0x0b, 0x42, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6d, 0x70, + 0x6f, 0x72, 0x74, 0x12, 0x27, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, + 0x2e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x42, 0x61, + 0x74, 0x63, 0x68, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x28, 0x2e, 0x4f, + 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, + 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6d, 0x70, 0x6f, + 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x75, 0x0a, 0x12, 0x4d, 0x6f, 0x76, 0x65, 0x55, 0x73, + 0x65, 0x72, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x2e, 0x2e, 0x4f, + 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, + 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x6f, 0x76, 0x65, 0x55, 0x73, 0x65, 0x72, 0x44, + 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x2f, 0x2e, 0x4f, + 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, + 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x6f, 0x76, 0x65, 0x55, 0x73, 0x65, 0x72, 0x44, + 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x6c, 0x0a, + 0x0f, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c, 0x4c, 0x69, 0x73, 0x74, + 0x12, 0x2b, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x6f, 0x72, + 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, + 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x2c, 0x2e, + 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, 0x6f, 0x72, 0x67, 0x61, 0x6e, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x46, + 0x75, 0x6c, 0x6c, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x78, 0x0a, 0x13, 0x53, + 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, 0x73, 0x46, 0x75, 0x6c, 0x6c, 0x49, 0x6e, + 0x66, 0x6f, 0x12, 0x2f, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, 0x2e, + 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x61, + 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, 0x73, 0x46, 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x65, 0x71, 0x1a, 0x30, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x68, 0x61, 0x74, + 0x2e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, + 0x61, 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, 0x73, 0x46, 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, + 0x6f, 0x52, 0x65, 0x73, 0x70, 0x42, 0x32, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x44, 0x4b, 0x2f, 0x63, 0x68, + 0x61, 0x74, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6f, 0x72, 0x67, + 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_organization_organization_proto_rawDescOnce sync.Once + file_organization_organization_proto_rawDescData = file_organization_organization_proto_rawDesc +) + +func file_organization_organization_proto_rawDescGZIP() []byte { + file_organization_organization_proto_rawDescOnce.Do(func() { + file_organization_organization_proto_rawDescData = protoimpl.X.CompressGZIP(file_organization_organization_proto_rawDescData) + }) + return file_organization_organization_proto_rawDescData +} + +var file_organization_organization_proto_msgTypes = make([]protoimpl.MessageInfo, 69) +var file_organization_organization_proto_goTypes = []interface{}{ + (*CreateDepartmentReq)(nil), // 0: OpenIMChat.organization.CreateDepartmentReq + (*CreateDepartmentResp)(nil), // 1: OpenIMChat.organization.CreateDepartmentResp + (*UpdateDepartmentReq)(nil), // 2: OpenIMChat.organization.UpdateDepartmentReq + (*UpdateDepartmentResp)(nil), // 3: OpenIMChat.organization.UpdateDepartmentResp + (*GetOrganizationDepartmentReq)(nil), // 4: OpenIMChat.organization.GetOrganizationDepartmentReq + (*DepartmentInfo)(nil), // 5: OpenIMChat.organization.DepartmentInfo + (*GetOrganizationDepartmentResp)(nil), // 6: OpenIMChat.organization.GetOrganizationDepartmentResp + (*DeleteDepartmentReq)(nil), // 7: OpenIMChat.organization.DeleteDepartmentReq + (*DeleteDepartmentResp)(nil), // 8: OpenIMChat.organization.DeleteDepartmentResp + (*GetDepartmentParentIDListReq)(nil), // 9: OpenIMChat.organization.GetDepartmentParentIDListReq + (*GetDepartmentParentIDListResp)(nil), // 10: OpenIMChat.organization.GetDepartmentParentIDListResp + (*CreateOrganizationUserReq)(nil), // 11: OpenIMChat.organization.CreateOrganizationUserReq + (*CreateOrganizationUserResp)(nil), // 12: OpenIMChat.organization.CreateOrganizationUserResp + (*UpdateOrganizationUserReq)(nil), // 13: OpenIMChat.organization.UpdateOrganizationUserReq + (*UpdateOrganizationUserResp)(nil), // 14: OpenIMChat.organization.UpdateOrganizationUserResp + (*CreateDepartmentMemberReq)(nil), // 15: OpenIMChat.organization.CreateDepartmentMemberReq + (*CreateDepartmentMemberResp)(nil), // 16: OpenIMChat.organization.CreateDepartmentMemberResp + (*GetUserInDepartmentReq)(nil), // 17: OpenIMChat.organization.GetUserInDepartmentReq + (*GetUserInDepartmentResp)(nil), // 18: OpenIMChat.organization.GetUserInDepartmentResp + (*UpdateUserInDepartmentReq)(nil), // 19: OpenIMChat.organization.UpdateUserInDepartmentReq + (*UpdateUserInDepartmentResp)(nil), // 20: OpenIMChat.organization.UpdateUserInDepartmentResp + (*DeleteUserInDepartmentReq)(nil), // 21: OpenIMChat.organization.DeleteUserInDepartmentReq + (*DeleteUserInDepartmentResp)(nil), // 22: OpenIMChat.organization.DeleteUserInDepartmentResp + (*DeleteOrganizationUserReq)(nil), // 23: OpenIMChat.organization.DeleteOrganizationUserReq + (*DeleteOrganizationUserResp)(nil), // 24: OpenIMChat.organization.DeleteOrganizationUserResp + (*GetDepartmentRelatedGroupIDListReq)(nil), // 25: OpenIMChat.organization.GetDepartmentRelatedGroupIDListReq + (*GetDepartmentRelatedGroupIDListResp)(nil), // 26: OpenIMChat.organization.GetDepartmentRelatedGroupIDListResp + (*GetUserInOrganizationReq)(nil), // 27: OpenIMChat.organization.GetUserInOrganizationReq + (*GetUserInOrganizationResp)(nil), // 28: OpenIMChat.organization.GetUserInOrganizationResp + (*GetCompleteOrganizationReq)(nil), // 29: OpenIMChat.organization.GetCompleteOrganizationReq + (*CompleteOrganization)(nil), // 30: OpenIMChat.organization.CompleteOrganization + (*GetCompleteOrganizationResp)(nil), // 31: OpenIMChat.organization.GetCompleteOrganizationResp + (*GetUsersInDepartmentReq)(nil), // 32: OpenIMChat.organization.GetUsersInDepartmentReq + (*GetUsersInDepartmentResp)(nil), // 33: OpenIMChat.organization.GetUsersInDepartmentResp + (*GetSearchUserListReq)(nil), // 34: OpenIMChat.organization.GetSearchUserListReq + (*GetSearchUserListSort)(nil), // 35: OpenIMChat.organization.GetSearchUserListSort + (*GetSearchUserListResp)(nil), // 36: OpenIMChat.organization.GetSearchUserListResp + (*SetOrganizationReq)(nil), // 37: OpenIMChat.organization.SetOrganizationReq + (*SetOrganizationResp)(nil), // 38: OpenIMChat.organization.SetOrganizationResp + (*GetOrganizationReq)(nil), // 39: OpenIMChat.organization.GetOrganizationReq + (*GetOrganizationResp)(nil), // 40: OpenIMChat.organization.GetOrganizationResp + (*GetSubDepartmentReq)(nil), // 41: OpenIMChat.organization.GetSubDepartmentReq + (*GetSubDepartmentResp)(nil), // 42: OpenIMChat.organization.GetSubDepartmentResp + (*GetSearchDepartmentUserReq)(nil), // 43: OpenIMChat.organization.GetSearchDepartmentUserReq + (*GetSearchDepartmentUserOrganizationUser)(nil), // 44: OpenIMChat.organization.GetSearchDepartmentUserOrganizationUser + (*GetSearchDepartmentUserResp)(nil), // 45: OpenIMChat.organization.GetSearchDepartmentUserResp + (*SortDepartmentListReq)(nil), // 46: OpenIMChat.organization.SortDepartmentListReq + (*SortDepartmentListResp)(nil), // 47: OpenIMChat.organization.SortDepartmentListResp + (*SortOrganizationUserListReq)(nil), // 48: OpenIMChat.organization.SortOrganizationUserListReq + (*SortOrganizationUserListResp)(nil), // 49: OpenIMChat.organization.SortOrganizationUserListResp + (*GetDepartmentReq)(nil), // 50: OpenIMChat.organization.GetDepartmentReq + (*GetDepartmentResp)(nil), // 51: OpenIMChat.organization.GetDepartmentResp + (*CreateNewOrganizationMemberReq)(nil), // 52: OpenIMChat.organization.CreateNewOrganizationMemberReq + (*CreateNewOrganizationMemberResp)(nil), // 53: OpenIMChat.organization.CreateNewOrganizationMemberResp + (*GetUserInfoReq)(nil), // 54: OpenIMChat.organization.GetUserInfoReq + (*GetUserInfoResp)(nil), // 55: OpenIMChat.organization.GetUserInfoResp + (*BatchImportUserDepartmentName)(nil), // 56: OpenIMChat.organization.BatchImportUserDepartmentName + (*BatchImportUserDepartmentNamePosition)(nil), // 57: OpenIMChat.organization.BatchImportUserDepartmentNamePosition + (*BatchImportUser)(nil), // 58: OpenIMChat.organization.BatchImportUser + (*BatchImportDepartment)(nil), // 59: OpenIMChat.organization.BatchImportDepartment + (*BatchImportReq)(nil), // 60: OpenIMChat.organization.BatchImportReq + (*BatchImportResp)(nil), // 61: OpenIMChat.organization.BatchImportResp + (*MoveUserDepartment)(nil), // 62: OpenIMChat.organization.MoveUserDepartment + (*MoveUserDepartmentReq)(nil), // 63: OpenIMChat.organization.MoveUserDepartmentReq + (*MoveUserDepartmentResp)(nil), // 64: OpenIMChat.organization.MoveUserDepartmentResp + (*GetUserFullListReq)(nil), // 65: OpenIMChat.organization.GetUserFullListReq + (*GetUserFullListResp)(nil), // 66: OpenIMChat.organization.GetUserFullListResp + (*SearchUsersFullInfoReq)(nil), // 67: OpenIMChat.organization.SearchUsersFullInfoReq + (*SearchUsersFullInfoResp)(nil), // 68: OpenIMChat.organization.SearchUsersFullInfoResp + (*common.Department)(nil), // 69: OpenIMChat.common.Department + (*common.OrganizationUser)(nil), // 70: OpenIMChat.common.OrganizationUser + (*common.DepartmentMember)(nil), // 71: OpenIMChat.common.DepartmentMember + (*common.UserInDepartment)(nil), // 72: OpenIMChat.common.UserInDepartment + (*common.Organization)(nil), // 73: OpenIMChat.common.Organization + (*common.UserIdentity)(nil), // 74: OpenIMChat.common.UserIdentity + (*common.Operation)(nil), // 75: OpenIMChat.common.Operation + (*common.RequestPagination)(nil), // 76: OpenIMChat.common.RequestPagination + (*common.UserPublicInfo)(nil), // 77: OpenIMChat.common.UserPublicInfo +} +var file_organization_organization_proto_depIdxs = []int32{ + 69, // 0: OpenIMChat.organization.CreateDepartmentReq.departmentInfo:type_name -> OpenIMChat.common.Department + 69, // 1: OpenIMChat.organization.CreateDepartmentResp.departmentInfo:type_name -> OpenIMChat.common.Department + 69, // 2: OpenIMChat.organization.UpdateDepartmentReq.departmentInfo:type_name -> OpenIMChat.common.Department + 69, // 3: OpenIMChat.organization.DepartmentInfo.department:type_name -> OpenIMChat.common.Department + 5, // 4: OpenIMChat.organization.DepartmentInfo.subDepartmentList:type_name -> OpenIMChat.organization.DepartmentInfo + 5, // 5: OpenIMChat.organization.GetOrganizationDepartmentResp.departmentList:type_name -> OpenIMChat.organization.DepartmentInfo + 70, // 6: OpenIMChat.organization.CreateOrganizationUserReq.organizationUser:type_name -> OpenIMChat.common.OrganizationUser + 70, // 7: OpenIMChat.organization.UpdateOrganizationUserReq.organizationUser:type_name -> OpenIMChat.common.OrganizationUser + 71, // 8: OpenIMChat.organization.CreateDepartmentMemberReq.departmentMember:type_name -> OpenIMChat.common.DepartmentMember + 72, // 9: OpenIMChat.organization.GetUserInDepartmentResp.userInDepartment:type_name -> OpenIMChat.common.UserInDepartment + 71, // 10: OpenIMChat.organization.UpdateUserInDepartmentReq.departmentMember:type_name -> OpenIMChat.common.DepartmentMember + 70, // 11: OpenIMChat.organization.GetUserInOrganizationResp.organizationUsers:type_name -> OpenIMChat.common.OrganizationUser + 30, // 12: OpenIMChat.organization.CompleteOrganization.list:type_name -> OpenIMChat.organization.CompleteOrganization + 30, // 13: OpenIMChat.organization.GetCompleteOrganizationResp.list:type_name -> OpenIMChat.organization.CompleteOrganization + 72, // 14: OpenIMChat.organization.GetUsersInDepartmentResp.list:type_name -> OpenIMChat.common.UserInDepartment + 35, // 15: OpenIMChat.organization.GetSearchUserListReq.sorts:type_name -> OpenIMChat.organization.GetSearchUserListSort + 72, // 16: OpenIMChat.organization.GetSearchUserListResp.userList:type_name -> OpenIMChat.common.UserInDepartment + 73, // 17: OpenIMChat.organization.SetOrganizationReq.organization:type_name -> OpenIMChat.common.Organization + 73, // 18: OpenIMChat.organization.GetOrganizationResp.organization:type_name -> OpenIMChat.common.Organization + 71, // 19: OpenIMChat.organization.GetSubDepartmentResp.departmentMemberList:type_name -> OpenIMChat.common.DepartmentMember + 69, // 20: OpenIMChat.organization.GetSubDepartmentResp.departmentList:type_name -> OpenIMChat.common.Department + 69, // 21: OpenIMChat.organization.GetSubDepartmentResp.departmentDirectoryList:type_name -> OpenIMChat.common.Department + 70, // 22: OpenIMChat.organization.GetSearchDepartmentUserOrganizationUser.organizationUser:type_name -> OpenIMChat.common.OrganizationUser + 69, // 23: OpenIMChat.organization.GetSearchDepartmentUserOrganizationUser.departmentList:type_name -> OpenIMChat.common.Department + 69, // 24: OpenIMChat.organization.GetSearchDepartmentUserResp.departmentList:type_name -> OpenIMChat.common.Department + 44, // 25: OpenIMChat.organization.GetSearchDepartmentUserResp.organizationUserList:type_name -> OpenIMChat.organization.GetSearchDepartmentUserOrganizationUser + 69, // 26: OpenIMChat.organization.GetDepartmentResp.department:type_name -> OpenIMChat.common.Department + 70, // 27: OpenIMChat.organization.CreateNewOrganizationMemberReq.organizationUser:type_name -> OpenIMChat.common.OrganizationUser + 71, // 28: OpenIMChat.organization.CreateNewOrganizationMemberReq.departmentMemberList:type_name -> OpenIMChat.common.DepartmentMember + 74, // 29: OpenIMChat.organization.CreateNewOrganizationMemberReq.userIdentity:type_name -> OpenIMChat.common.UserIdentity + 70, // 30: OpenIMChat.organization.GetUserInfoResp.user:type_name -> OpenIMChat.common.OrganizationUser + 57, // 31: OpenIMChat.organization.BatchImportUser.userDepartmentNameList:type_name -> OpenIMChat.organization.BatchImportUserDepartmentNamePosition + 56, // 32: OpenIMChat.organization.BatchImportDepartment.parentDepartmentName:type_name -> OpenIMChat.organization.BatchImportUserDepartmentName + 58, // 33: OpenIMChat.organization.BatchImportReq.userList:type_name -> OpenIMChat.organization.BatchImportUser + 59, // 34: OpenIMChat.organization.BatchImportReq.departmentList:type_name -> OpenIMChat.organization.BatchImportDepartment + 62, // 35: OpenIMChat.organization.MoveUserDepartmentReq.moveUserDepartmentList:type_name -> OpenIMChat.organization.MoveUserDepartment + 70, // 36: OpenIMChat.organization.GetUserFullListResp.organizationUserList:type_name -> OpenIMChat.common.OrganizationUser + 75, // 37: OpenIMChat.organization.SearchUsersFullInfoReq.operation:type_name -> OpenIMChat.common.Operation + 76, // 38: OpenIMChat.organization.SearchUsersFullInfoReq.pagination:type_name -> OpenIMChat.common.RequestPagination + 77, // 39: OpenIMChat.organization.SearchUsersFullInfoReq.userPublicInfo:type_name -> OpenIMChat.common.UserPublicInfo + 70, // 40: OpenIMChat.organization.SearchUsersFullInfoResp.organizationUserList:type_name -> OpenIMChat.common.OrganizationUser + 0, // 41: OpenIMChat.organization.organization.CreateDepartment:input_type -> OpenIMChat.organization.CreateDepartmentReq + 2, // 42: OpenIMChat.organization.organization.UpdateDepartment:input_type -> OpenIMChat.organization.UpdateDepartmentReq + 4, // 43: OpenIMChat.organization.organization.GetOrganizationDepartment:input_type -> OpenIMChat.organization.GetOrganizationDepartmentReq + 7, // 44: OpenIMChat.organization.organization.DeleteDepartment:input_type -> OpenIMChat.organization.DeleteDepartmentReq + 50, // 45: OpenIMChat.organization.organization.GetDepartment:input_type -> OpenIMChat.organization.GetDepartmentReq + 11, // 46: OpenIMChat.organization.organization.CreateOrganizationUser:input_type -> OpenIMChat.organization.CreateOrganizationUserReq + 13, // 47: OpenIMChat.organization.organization.UpdateOrganizationUser:input_type -> OpenIMChat.organization.UpdateOrganizationUserReq + 23, // 48: OpenIMChat.organization.organization.DeleteOrganizationUser:input_type -> OpenIMChat.organization.DeleteOrganizationUserReq + 15, // 49: OpenIMChat.organization.organization.CreateDepartmentMember:input_type -> OpenIMChat.organization.CreateDepartmentMemberReq + 17, // 50: OpenIMChat.organization.organization.GetUserInDepartment:input_type -> OpenIMChat.organization.GetUserInDepartmentReq + 21, // 51: OpenIMChat.organization.organization.DeleteUserInDepartment:input_type -> OpenIMChat.organization.DeleteUserInDepartmentReq + 19, // 52: OpenIMChat.organization.organization.UpdateUserInDepartment:input_type -> OpenIMChat.organization.UpdateUserInDepartmentReq + 34, // 53: OpenIMChat.organization.organization.GetSearchUserList:input_type -> OpenIMChat.organization.GetSearchUserListReq + 37, // 54: OpenIMChat.organization.organization.SetOrganization:input_type -> OpenIMChat.organization.SetOrganizationReq + 39, // 55: OpenIMChat.organization.organization.GetOrganization:input_type -> OpenIMChat.organization.GetOrganizationReq + 41, // 56: OpenIMChat.organization.organization.GetSubDepartment:input_type -> OpenIMChat.organization.GetSubDepartmentReq + 43, // 57: OpenIMChat.organization.organization.GetSearchDepartmentUser:input_type -> OpenIMChat.organization.GetSearchDepartmentUserReq + 46, // 58: OpenIMChat.organization.organization.SortDepartmentList:input_type -> OpenIMChat.organization.SortDepartmentListReq + 48, // 59: OpenIMChat.organization.organization.SortOrganizationUserList:input_type -> OpenIMChat.organization.SortOrganizationUserListReq + 52, // 60: OpenIMChat.organization.organization.CreateNewOrganizationMember:input_type -> OpenIMChat.organization.CreateNewOrganizationMemberReq + 54, // 61: OpenIMChat.organization.organization.GetUserInfo:input_type -> OpenIMChat.organization.GetUserInfoReq + 60, // 62: OpenIMChat.organization.organization.BatchImport:input_type -> OpenIMChat.organization.BatchImportReq + 63, // 63: OpenIMChat.organization.organization.MoveUserDepartment:input_type -> OpenIMChat.organization.MoveUserDepartmentReq + 65, // 64: OpenIMChat.organization.organization.GetUserFullList:input_type -> OpenIMChat.organization.GetUserFullListReq + 67, // 65: OpenIMChat.organization.organization.SearchUsersFullInfo:input_type -> OpenIMChat.organization.SearchUsersFullInfoReq + 1, // 66: OpenIMChat.organization.organization.CreateDepartment:output_type -> OpenIMChat.organization.CreateDepartmentResp + 3, // 67: OpenIMChat.organization.organization.UpdateDepartment:output_type -> OpenIMChat.organization.UpdateDepartmentResp + 6, // 68: OpenIMChat.organization.organization.GetOrganizationDepartment:output_type -> OpenIMChat.organization.GetOrganizationDepartmentResp + 8, // 69: OpenIMChat.organization.organization.DeleteDepartment:output_type -> OpenIMChat.organization.DeleteDepartmentResp + 51, // 70: OpenIMChat.organization.organization.GetDepartment:output_type -> OpenIMChat.organization.GetDepartmentResp + 12, // 71: OpenIMChat.organization.organization.CreateOrganizationUser:output_type -> OpenIMChat.organization.CreateOrganizationUserResp + 14, // 72: OpenIMChat.organization.organization.UpdateOrganizationUser:output_type -> OpenIMChat.organization.UpdateOrganizationUserResp + 24, // 73: OpenIMChat.organization.organization.DeleteOrganizationUser:output_type -> OpenIMChat.organization.DeleteOrganizationUserResp + 16, // 74: OpenIMChat.organization.organization.CreateDepartmentMember:output_type -> OpenIMChat.organization.CreateDepartmentMemberResp + 18, // 75: OpenIMChat.organization.organization.GetUserInDepartment:output_type -> OpenIMChat.organization.GetUserInDepartmentResp + 22, // 76: OpenIMChat.organization.organization.DeleteUserInDepartment:output_type -> OpenIMChat.organization.DeleteUserInDepartmentResp + 20, // 77: OpenIMChat.organization.organization.UpdateUserInDepartment:output_type -> OpenIMChat.organization.UpdateUserInDepartmentResp + 36, // 78: OpenIMChat.organization.organization.GetSearchUserList:output_type -> OpenIMChat.organization.GetSearchUserListResp + 38, // 79: OpenIMChat.organization.organization.SetOrganization:output_type -> OpenIMChat.organization.SetOrganizationResp + 40, // 80: OpenIMChat.organization.organization.GetOrganization:output_type -> OpenIMChat.organization.GetOrganizationResp + 42, // 81: OpenIMChat.organization.organization.GetSubDepartment:output_type -> OpenIMChat.organization.GetSubDepartmentResp + 45, // 82: OpenIMChat.organization.organization.GetSearchDepartmentUser:output_type -> OpenIMChat.organization.GetSearchDepartmentUserResp + 47, // 83: OpenIMChat.organization.organization.SortDepartmentList:output_type -> OpenIMChat.organization.SortDepartmentListResp + 49, // 84: OpenIMChat.organization.organization.SortOrganizationUserList:output_type -> OpenIMChat.organization.SortOrganizationUserListResp + 53, // 85: OpenIMChat.organization.organization.CreateNewOrganizationMember:output_type -> OpenIMChat.organization.CreateNewOrganizationMemberResp + 55, // 86: OpenIMChat.organization.organization.GetUserInfo:output_type -> OpenIMChat.organization.GetUserInfoResp + 61, // 87: OpenIMChat.organization.organization.BatchImport:output_type -> OpenIMChat.organization.BatchImportResp + 64, // 88: OpenIMChat.organization.organization.MoveUserDepartment:output_type -> OpenIMChat.organization.MoveUserDepartmentResp + 66, // 89: OpenIMChat.organization.organization.GetUserFullList:output_type -> OpenIMChat.organization.GetUserFullListResp + 68, // 90: OpenIMChat.organization.organization.SearchUsersFullInfo:output_type -> OpenIMChat.organization.SearchUsersFullInfoResp + 66, // [66:91] is the sub-list for method output_type + 41, // [41:66] is the sub-list for method input_type + 41, // [41:41] is the sub-list for extension type_name + 41, // [41:41] is the sub-list for extension extendee + 0, // [0:41] is the sub-list for field type_name +} + +func init() { file_organization_organization_proto_init() } +func file_organization_organization_proto_init() { + if File_organization_organization_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_organization_organization_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateDepartmentReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_organization_organization_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateDepartmentResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_organization_organization_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateDepartmentReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_organization_organization_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateDepartmentResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_organization_organization_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetOrganizationDepartmentReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_organization_organization_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DepartmentInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_organization_organization_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetOrganizationDepartmentResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_organization_organization_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteDepartmentReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_organization_organization_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteDepartmentResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_organization_organization_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetDepartmentParentIDListReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_organization_organization_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetDepartmentParentIDListResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_organization_organization_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateOrganizationUserReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_organization_organization_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateOrganizationUserResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_organization_organization_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateOrganizationUserReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_organization_organization_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateOrganizationUserResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_organization_organization_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateDepartmentMemberReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_organization_organization_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateDepartmentMemberResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_organization_organization_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetUserInDepartmentReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_organization_organization_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetUserInDepartmentResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_organization_organization_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateUserInDepartmentReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_organization_organization_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateUserInDepartmentResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_organization_organization_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteUserInDepartmentReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_organization_organization_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteUserInDepartmentResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_organization_organization_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteOrganizationUserReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_organization_organization_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteOrganizationUserResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_organization_organization_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetDepartmentRelatedGroupIDListReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_organization_organization_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetDepartmentRelatedGroupIDListResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_organization_organization_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetUserInOrganizationReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_organization_organization_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetUserInOrganizationResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_organization_organization_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetCompleteOrganizationReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_organization_organization_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CompleteOrganization); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_organization_organization_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetCompleteOrganizationResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_organization_organization_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetUsersInDepartmentReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_organization_organization_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetUsersInDepartmentResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_organization_organization_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetSearchUserListReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_organization_organization_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetSearchUserListSort); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_organization_organization_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetSearchUserListResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_organization_organization_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetOrganizationReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_organization_organization_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetOrganizationResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_organization_organization_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetOrganizationReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_organization_organization_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetOrganizationResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_organization_organization_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetSubDepartmentReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_organization_organization_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetSubDepartmentResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_organization_organization_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetSearchDepartmentUserReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_organization_organization_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetSearchDepartmentUserOrganizationUser); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_organization_organization_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetSearchDepartmentUserResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_organization_organization_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SortDepartmentListReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_organization_organization_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SortDepartmentListResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_organization_organization_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SortOrganizationUserListReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_organization_organization_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SortOrganizationUserListResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_organization_organization_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetDepartmentReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_organization_organization_proto_msgTypes[51].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetDepartmentResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_organization_organization_proto_msgTypes[52].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateNewOrganizationMemberReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_organization_organization_proto_msgTypes[53].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateNewOrganizationMemberResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_organization_organization_proto_msgTypes[54].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetUserInfoReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_organization_organization_proto_msgTypes[55].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetUserInfoResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_organization_organization_proto_msgTypes[56].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BatchImportUserDepartmentName); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_organization_organization_proto_msgTypes[57].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BatchImportUserDepartmentNamePosition); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_organization_organization_proto_msgTypes[58].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BatchImportUser); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_organization_organization_proto_msgTypes[59].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BatchImportDepartment); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_organization_organization_proto_msgTypes[60].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BatchImportReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_organization_organization_proto_msgTypes[61].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BatchImportResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_organization_organization_proto_msgTypes[62].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MoveUserDepartment); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_organization_organization_proto_msgTypes[63].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MoveUserDepartmentReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_organization_organization_proto_msgTypes[64].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MoveUserDepartmentResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_organization_organization_proto_msgTypes[65].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetUserFullListReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_organization_organization_proto_msgTypes[66].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetUserFullListResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_organization_organization_proto_msgTypes[67].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SearchUsersFullInfoReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_organization_organization_proto_msgTypes[68].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SearchUsersFullInfoResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_organization_organization_proto_rawDesc, + NumEnums: 0, + NumMessages: 69, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_organization_organization_proto_goTypes, + DependencyIndexes: file_organization_organization_proto_depIdxs, + MessageInfos: file_organization_organization_proto_msgTypes, + }.Build() + File_organization_organization_proto = out.File + file_organization_organization_proto_rawDesc = nil + file_organization_organization_proto_goTypes = nil + file_organization_organization_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// OrganizationClient is the client API for Organization service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type OrganizationClient interface { + CreateDepartment(ctx context.Context, in *CreateDepartmentReq, opts ...grpc.CallOption) (*CreateDepartmentResp, error) + UpdateDepartment(ctx context.Context, in *UpdateDepartmentReq, opts ...grpc.CallOption) (*UpdateDepartmentResp, error) + GetOrganizationDepartment(ctx context.Context, in *GetOrganizationDepartmentReq, opts ...grpc.CallOption) (*GetOrganizationDepartmentResp, error) + DeleteDepartment(ctx context.Context, in *DeleteDepartmentReq, opts ...grpc.CallOption) (*DeleteDepartmentResp, error) + GetDepartment(ctx context.Context, in *GetDepartmentReq, opts ...grpc.CallOption) (*GetDepartmentResp, error) + CreateOrganizationUser(ctx context.Context, in *CreateOrganizationUserReq, opts ...grpc.CallOption) (*CreateOrganizationUserResp, error) + UpdateOrganizationUser(ctx context.Context, in *UpdateOrganizationUserReq, opts ...grpc.CallOption) (*UpdateOrganizationUserResp, error) + DeleteOrganizationUser(ctx context.Context, in *DeleteOrganizationUserReq, opts ...grpc.CallOption) (*DeleteOrganizationUserResp, error) + CreateDepartmentMember(ctx context.Context, in *CreateDepartmentMemberReq, opts ...grpc.CallOption) (*CreateDepartmentMemberResp, error) + GetUserInDepartment(ctx context.Context, in *GetUserInDepartmentReq, opts ...grpc.CallOption) (*GetUserInDepartmentResp, error) + DeleteUserInDepartment(ctx context.Context, in *DeleteUserInDepartmentReq, opts ...grpc.CallOption) (*DeleteUserInDepartmentResp, error) + UpdateUserInDepartment(ctx context.Context, in *UpdateUserInDepartmentReq, opts ...grpc.CallOption) (*UpdateUserInDepartmentResp, error) + GetSearchUserList(ctx context.Context, in *GetSearchUserListReq, opts ...grpc.CallOption) (*GetSearchUserListResp, error) + SetOrganization(ctx context.Context, in *SetOrganizationReq, opts ...grpc.CallOption) (*SetOrganizationResp, error) + GetOrganization(ctx context.Context, in *GetOrganizationReq, opts ...grpc.CallOption) (*GetOrganizationResp, error) + GetSubDepartment(ctx context.Context, in *GetSubDepartmentReq, opts ...grpc.CallOption) (*GetSubDepartmentResp, error) + GetSearchDepartmentUser(ctx context.Context, in *GetSearchDepartmentUserReq, opts ...grpc.CallOption) (*GetSearchDepartmentUserResp, error) + SortDepartmentList(ctx context.Context, in *SortDepartmentListReq, opts ...grpc.CallOption) (*SortDepartmentListResp, error) + SortOrganizationUserList(ctx context.Context, in *SortOrganizationUserListReq, opts ...grpc.CallOption) (*SortOrganizationUserListResp, error) + CreateNewOrganizationMember(ctx context.Context, in *CreateNewOrganizationMemberReq, opts ...grpc.CallOption) (*CreateNewOrganizationMemberResp, error) + GetUserInfo(ctx context.Context, in *GetUserInfoReq, opts ...grpc.CallOption) (*GetUserInfoResp, error) + BatchImport(ctx context.Context, in *BatchImportReq, opts ...grpc.CallOption) (*BatchImportResp, error) + MoveUserDepartment(ctx context.Context, in *MoveUserDepartmentReq, opts ...grpc.CallOption) (*MoveUserDepartmentResp, error) + GetUserFullList(ctx context.Context, in *GetUserFullListReq, opts ...grpc.CallOption) (*GetUserFullListResp, error) + SearchUsersFullInfo(ctx context.Context, in *SearchUsersFullInfoReq, opts ...grpc.CallOption) (*SearchUsersFullInfoResp, error) +} + +type organizationClient struct { + cc grpc.ClientConnInterface +} + +func NewOrganizationClient(cc grpc.ClientConnInterface) OrganizationClient { + return &organizationClient{cc} +} + +func (c *organizationClient) CreateDepartment(ctx context.Context, in *CreateDepartmentReq, opts ...grpc.CallOption) (*CreateDepartmentResp, error) { + out := new(CreateDepartmentResp) + err := c.cc.Invoke(ctx, "/OpenIMChat.organization.organization/CreateDepartment", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *organizationClient) UpdateDepartment(ctx context.Context, in *UpdateDepartmentReq, opts ...grpc.CallOption) (*UpdateDepartmentResp, error) { + out := new(UpdateDepartmentResp) + err := c.cc.Invoke(ctx, "/OpenIMChat.organization.organization/UpdateDepartment", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *organizationClient) GetOrganizationDepartment(ctx context.Context, in *GetOrganizationDepartmentReq, opts ...grpc.CallOption) (*GetOrganizationDepartmentResp, error) { + out := new(GetOrganizationDepartmentResp) + err := c.cc.Invoke(ctx, "/OpenIMChat.organization.organization/GetOrganizationDepartment", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *organizationClient) DeleteDepartment(ctx context.Context, in *DeleteDepartmentReq, opts ...grpc.CallOption) (*DeleteDepartmentResp, error) { + out := new(DeleteDepartmentResp) + err := c.cc.Invoke(ctx, "/OpenIMChat.organization.organization/DeleteDepartment", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *organizationClient) GetDepartment(ctx context.Context, in *GetDepartmentReq, opts ...grpc.CallOption) (*GetDepartmentResp, error) { + out := new(GetDepartmentResp) + err := c.cc.Invoke(ctx, "/OpenIMChat.organization.organization/GetDepartment", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *organizationClient) CreateOrganizationUser(ctx context.Context, in *CreateOrganizationUserReq, opts ...grpc.CallOption) (*CreateOrganizationUserResp, error) { + out := new(CreateOrganizationUserResp) + err := c.cc.Invoke(ctx, "/OpenIMChat.organization.organization/CreateOrganizationUser", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *organizationClient) UpdateOrganizationUser(ctx context.Context, in *UpdateOrganizationUserReq, opts ...grpc.CallOption) (*UpdateOrganizationUserResp, error) { + out := new(UpdateOrganizationUserResp) + err := c.cc.Invoke(ctx, "/OpenIMChat.organization.organization/UpdateOrganizationUser", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *organizationClient) DeleteOrganizationUser(ctx context.Context, in *DeleteOrganizationUserReq, opts ...grpc.CallOption) (*DeleteOrganizationUserResp, error) { + out := new(DeleteOrganizationUserResp) + err := c.cc.Invoke(ctx, "/OpenIMChat.organization.organization/DeleteOrganizationUser", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *organizationClient) CreateDepartmentMember(ctx context.Context, in *CreateDepartmentMemberReq, opts ...grpc.CallOption) (*CreateDepartmentMemberResp, error) { + out := new(CreateDepartmentMemberResp) + err := c.cc.Invoke(ctx, "/OpenIMChat.organization.organization/CreateDepartmentMember", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *organizationClient) GetUserInDepartment(ctx context.Context, in *GetUserInDepartmentReq, opts ...grpc.CallOption) (*GetUserInDepartmentResp, error) { + out := new(GetUserInDepartmentResp) + err := c.cc.Invoke(ctx, "/OpenIMChat.organization.organization/GetUserInDepartment", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *organizationClient) DeleteUserInDepartment(ctx context.Context, in *DeleteUserInDepartmentReq, opts ...grpc.CallOption) (*DeleteUserInDepartmentResp, error) { + out := new(DeleteUserInDepartmentResp) + err := c.cc.Invoke(ctx, "/OpenIMChat.organization.organization/DeleteUserInDepartment", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *organizationClient) UpdateUserInDepartment(ctx context.Context, in *UpdateUserInDepartmentReq, opts ...grpc.CallOption) (*UpdateUserInDepartmentResp, error) { + out := new(UpdateUserInDepartmentResp) + err := c.cc.Invoke(ctx, "/OpenIMChat.organization.organization/UpdateUserInDepartment", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *organizationClient) GetSearchUserList(ctx context.Context, in *GetSearchUserListReq, opts ...grpc.CallOption) (*GetSearchUserListResp, error) { + out := new(GetSearchUserListResp) + err := c.cc.Invoke(ctx, "/OpenIMChat.organization.organization/GetSearchUserList", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *organizationClient) SetOrganization(ctx context.Context, in *SetOrganizationReq, opts ...grpc.CallOption) (*SetOrganizationResp, error) { + out := new(SetOrganizationResp) + err := c.cc.Invoke(ctx, "/OpenIMChat.organization.organization/SetOrganization", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *organizationClient) GetOrganization(ctx context.Context, in *GetOrganizationReq, opts ...grpc.CallOption) (*GetOrganizationResp, error) { + out := new(GetOrganizationResp) + err := c.cc.Invoke(ctx, "/OpenIMChat.organization.organization/GetOrganization", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *organizationClient) GetSubDepartment(ctx context.Context, in *GetSubDepartmentReq, opts ...grpc.CallOption) (*GetSubDepartmentResp, error) { + out := new(GetSubDepartmentResp) + err := c.cc.Invoke(ctx, "/OpenIMChat.organization.organization/GetSubDepartment", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *organizationClient) GetSearchDepartmentUser(ctx context.Context, in *GetSearchDepartmentUserReq, opts ...grpc.CallOption) (*GetSearchDepartmentUserResp, error) { + out := new(GetSearchDepartmentUserResp) + err := c.cc.Invoke(ctx, "/OpenIMChat.organization.organization/GetSearchDepartmentUser", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *organizationClient) SortDepartmentList(ctx context.Context, in *SortDepartmentListReq, opts ...grpc.CallOption) (*SortDepartmentListResp, error) { + out := new(SortDepartmentListResp) + err := c.cc.Invoke(ctx, "/OpenIMChat.organization.organization/SortDepartmentList", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *organizationClient) SortOrganizationUserList(ctx context.Context, in *SortOrganizationUserListReq, opts ...grpc.CallOption) (*SortOrganizationUserListResp, error) { + out := new(SortOrganizationUserListResp) + err := c.cc.Invoke(ctx, "/OpenIMChat.organization.organization/SortOrganizationUserList", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *organizationClient) CreateNewOrganizationMember(ctx context.Context, in *CreateNewOrganizationMemberReq, opts ...grpc.CallOption) (*CreateNewOrganizationMemberResp, error) { + out := new(CreateNewOrganizationMemberResp) + err := c.cc.Invoke(ctx, "/OpenIMChat.organization.organization/CreateNewOrganizationMember", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *organizationClient) GetUserInfo(ctx context.Context, in *GetUserInfoReq, opts ...grpc.CallOption) (*GetUserInfoResp, error) { + out := new(GetUserInfoResp) + err := c.cc.Invoke(ctx, "/OpenIMChat.organization.organization/GetUserInfo", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *organizationClient) BatchImport(ctx context.Context, in *BatchImportReq, opts ...grpc.CallOption) (*BatchImportResp, error) { + out := new(BatchImportResp) + err := c.cc.Invoke(ctx, "/OpenIMChat.organization.organization/BatchImport", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *organizationClient) MoveUserDepartment(ctx context.Context, in *MoveUserDepartmentReq, opts ...grpc.CallOption) (*MoveUserDepartmentResp, error) { + out := new(MoveUserDepartmentResp) + err := c.cc.Invoke(ctx, "/OpenIMChat.organization.organization/MoveUserDepartment", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *organizationClient) GetUserFullList(ctx context.Context, in *GetUserFullListReq, opts ...grpc.CallOption) (*GetUserFullListResp, error) { + out := new(GetUserFullListResp) + err := c.cc.Invoke(ctx, "/OpenIMChat.organization.organization/GetUserFullList", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *organizationClient) SearchUsersFullInfo(ctx context.Context, in *SearchUsersFullInfoReq, opts ...grpc.CallOption) (*SearchUsersFullInfoResp, error) { + out := new(SearchUsersFullInfoResp) + err := c.cc.Invoke(ctx, "/OpenIMChat.organization.organization/SearchUsersFullInfo", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// OrganizationServer is the server API for Organization service. +type OrganizationServer interface { + CreateDepartment(context.Context, *CreateDepartmentReq) (*CreateDepartmentResp, error) + UpdateDepartment(context.Context, *UpdateDepartmentReq) (*UpdateDepartmentResp, error) + GetOrganizationDepartment(context.Context, *GetOrganizationDepartmentReq) (*GetOrganizationDepartmentResp, error) + DeleteDepartment(context.Context, *DeleteDepartmentReq) (*DeleteDepartmentResp, error) + GetDepartment(context.Context, *GetDepartmentReq) (*GetDepartmentResp, error) + CreateOrganizationUser(context.Context, *CreateOrganizationUserReq) (*CreateOrganizationUserResp, error) + UpdateOrganizationUser(context.Context, *UpdateOrganizationUserReq) (*UpdateOrganizationUserResp, error) + DeleteOrganizationUser(context.Context, *DeleteOrganizationUserReq) (*DeleteOrganizationUserResp, error) + CreateDepartmentMember(context.Context, *CreateDepartmentMemberReq) (*CreateDepartmentMemberResp, error) + GetUserInDepartment(context.Context, *GetUserInDepartmentReq) (*GetUserInDepartmentResp, error) + DeleteUserInDepartment(context.Context, *DeleteUserInDepartmentReq) (*DeleteUserInDepartmentResp, error) + UpdateUserInDepartment(context.Context, *UpdateUserInDepartmentReq) (*UpdateUserInDepartmentResp, error) + GetSearchUserList(context.Context, *GetSearchUserListReq) (*GetSearchUserListResp, error) + SetOrganization(context.Context, *SetOrganizationReq) (*SetOrganizationResp, error) + GetOrganization(context.Context, *GetOrganizationReq) (*GetOrganizationResp, error) + GetSubDepartment(context.Context, *GetSubDepartmentReq) (*GetSubDepartmentResp, error) + GetSearchDepartmentUser(context.Context, *GetSearchDepartmentUserReq) (*GetSearchDepartmentUserResp, error) + SortDepartmentList(context.Context, *SortDepartmentListReq) (*SortDepartmentListResp, error) + SortOrganizationUserList(context.Context, *SortOrganizationUserListReq) (*SortOrganizationUserListResp, error) + CreateNewOrganizationMember(context.Context, *CreateNewOrganizationMemberReq) (*CreateNewOrganizationMemberResp, error) + GetUserInfo(context.Context, *GetUserInfoReq) (*GetUserInfoResp, error) + BatchImport(context.Context, *BatchImportReq) (*BatchImportResp, error) + MoveUserDepartment(context.Context, *MoveUserDepartmentReq) (*MoveUserDepartmentResp, error) + GetUserFullList(context.Context, *GetUserFullListReq) (*GetUserFullListResp, error) + SearchUsersFullInfo(context.Context, *SearchUsersFullInfoReq) (*SearchUsersFullInfoResp, error) +} + +// UnimplementedOrganizationServer can be embedded to have forward compatible implementations. +type UnimplementedOrganizationServer struct { +} + +func (*UnimplementedOrganizationServer) CreateDepartment(context.Context, *CreateDepartmentReq) (*CreateDepartmentResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateDepartment not implemented") +} +func (*UnimplementedOrganizationServer) UpdateDepartment(context.Context, *UpdateDepartmentReq) (*UpdateDepartmentResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateDepartment not implemented") +} +func (*UnimplementedOrganizationServer) GetOrganizationDepartment(context.Context, *GetOrganizationDepartmentReq) (*GetOrganizationDepartmentResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetOrganizationDepartment not implemented") +} +func (*UnimplementedOrganizationServer) DeleteDepartment(context.Context, *DeleteDepartmentReq) (*DeleteDepartmentResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteDepartment not implemented") +} +func (*UnimplementedOrganizationServer) GetDepartment(context.Context, *GetDepartmentReq) (*GetDepartmentResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetDepartment not implemented") +} +func (*UnimplementedOrganizationServer) CreateOrganizationUser(context.Context, *CreateOrganizationUserReq) (*CreateOrganizationUserResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateOrganizationUser not implemented") +} +func (*UnimplementedOrganizationServer) UpdateOrganizationUser(context.Context, *UpdateOrganizationUserReq) (*UpdateOrganizationUserResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateOrganizationUser not implemented") +} +func (*UnimplementedOrganizationServer) DeleteOrganizationUser(context.Context, *DeleteOrganizationUserReq) (*DeleteOrganizationUserResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteOrganizationUser not implemented") +} +func (*UnimplementedOrganizationServer) CreateDepartmentMember(context.Context, *CreateDepartmentMemberReq) (*CreateDepartmentMemberResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateDepartmentMember not implemented") +} +func (*UnimplementedOrganizationServer) GetUserInDepartment(context.Context, *GetUserInDepartmentReq) (*GetUserInDepartmentResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetUserInDepartment not implemented") +} +func (*UnimplementedOrganizationServer) DeleteUserInDepartment(context.Context, *DeleteUserInDepartmentReq) (*DeleteUserInDepartmentResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteUserInDepartment not implemented") +} +func (*UnimplementedOrganizationServer) UpdateUserInDepartment(context.Context, *UpdateUserInDepartmentReq) (*UpdateUserInDepartmentResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateUserInDepartment not implemented") +} +func (*UnimplementedOrganizationServer) GetSearchUserList(context.Context, *GetSearchUserListReq) (*GetSearchUserListResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetSearchUserList not implemented") +} +func (*UnimplementedOrganizationServer) SetOrganization(context.Context, *SetOrganizationReq) (*SetOrganizationResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetOrganization not implemented") +} +func (*UnimplementedOrganizationServer) GetOrganization(context.Context, *GetOrganizationReq) (*GetOrganizationResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetOrganization not implemented") +} +func (*UnimplementedOrganizationServer) GetSubDepartment(context.Context, *GetSubDepartmentReq) (*GetSubDepartmentResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetSubDepartment not implemented") +} +func (*UnimplementedOrganizationServer) GetSearchDepartmentUser(context.Context, *GetSearchDepartmentUserReq) (*GetSearchDepartmentUserResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetSearchDepartmentUser not implemented") +} +func (*UnimplementedOrganizationServer) SortDepartmentList(context.Context, *SortDepartmentListReq) (*SortDepartmentListResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method SortDepartmentList not implemented") +} +func (*UnimplementedOrganizationServer) SortOrganizationUserList(context.Context, *SortOrganizationUserListReq) (*SortOrganizationUserListResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method SortOrganizationUserList not implemented") +} +func (*UnimplementedOrganizationServer) CreateNewOrganizationMember(context.Context, *CreateNewOrganizationMemberReq) (*CreateNewOrganizationMemberResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateNewOrganizationMember not implemented") +} +func (*UnimplementedOrganizationServer) GetUserInfo(context.Context, *GetUserInfoReq) (*GetUserInfoResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetUserInfo not implemented") +} +func (*UnimplementedOrganizationServer) BatchImport(context.Context, *BatchImportReq) (*BatchImportResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method BatchImport not implemented") +} +func (*UnimplementedOrganizationServer) MoveUserDepartment(context.Context, *MoveUserDepartmentReq) (*MoveUserDepartmentResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method MoveUserDepartment not implemented") +} +func (*UnimplementedOrganizationServer) GetUserFullList(context.Context, *GetUserFullListReq) (*GetUserFullListResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetUserFullList not implemented") +} +func (*UnimplementedOrganizationServer) SearchUsersFullInfo(context.Context, *SearchUsersFullInfoReq) (*SearchUsersFullInfoResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method SearchUsersFullInfo not implemented") +} + +func RegisterOrganizationServer(s *grpc.Server, srv OrganizationServer) { + s.RegisterService(&_Organization_serviceDesc, srv) +} + +func _Organization_CreateDepartment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateDepartmentReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OrganizationServer).CreateDepartment(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/OpenIMChat.organization.organization/CreateDepartment", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OrganizationServer).CreateDepartment(ctx, req.(*CreateDepartmentReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Organization_UpdateDepartment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateDepartmentReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OrganizationServer).UpdateDepartment(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/OpenIMChat.organization.organization/UpdateDepartment", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OrganizationServer).UpdateDepartment(ctx, req.(*UpdateDepartmentReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Organization_GetOrganizationDepartment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetOrganizationDepartmentReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OrganizationServer).GetOrganizationDepartment(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/OpenIMChat.organization.organization/GetOrganizationDepartment", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OrganizationServer).GetOrganizationDepartment(ctx, req.(*GetOrganizationDepartmentReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Organization_DeleteDepartment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteDepartmentReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OrganizationServer).DeleteDepartment(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/OpenIMChat.organization.organization/DeleteDepartment", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OrganizationServer).DeleteDepartment(ctx, req.(*DeleteDepartmentReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Organization_GetDepartment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetDepartmentReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OrganizationServer).GetDepartment(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/OpenIMChat.organization.organization/GetDepartment", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OrganizationServer).GetDepartment(ctx, req.(*GetDepartmentReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Organization_CreateOrganizationUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateOrganizationUserReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OrganizationServer).CreateOrganizationUser(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/OpenIMChat.organization.organization/CreateOrganizationUser", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OrganizationServer).CreateOrganizationUser(ctx, req.(*CreateOrganizationUserReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Organization_UpdateOrganizationUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateOrganizationUserReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OrganizationServer).UpdateOrganizationUser(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/OpenIMChat.organization.organization/UpdateOrganizationUser", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OrganizationServer).UpdateOrganizationUser(ctx, req.(*UpdateOrganizationUserReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Organization_DeleteOrganizationUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteOrganizationUserReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OrganizationServer).DeleteOrganizationUser(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/OpenIMChat.organization.organization/DeleteOrganizationUser", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OrganizationServer).DeleteOrganizationUser(ctx, req.(*DeleteOrganizationUserReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Organization_CreateDepartmentMember_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateDepartmentMemberReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OrganizationServer).CreateDepartmentMember(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/OpenIMChat.organization.organization/CreateDepartmentMember", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OrganizationServer).CreateDepartmentMember(ctx, req.(*CreateDepartmentMemberReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Organization_GetUserInDepartment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetUserInDepartmentReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OrganizationServer).GetUserInDepartment(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/OpenIMChat.organization.organization/GetUserInDepartment", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OrganizationServer).GetUserInDepartment(ctx, req.(*GetUserInDepartmentReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Organization_DeleteUserInDepartment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteUserInDepartmentReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OrganizationServer).DeleteUserInDepartment(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/OpenIMChat.organization.organization/DeleteUserInDepartment", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OrganizationServer).DeleteUserInDepartment(ctx, req.(*DeleteUserInDepartmentReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Organization_UpdateUserInDepartment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateUserInDepartmentReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OrganizationServer).UpdateUserInDepartment(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/OpenIMChat.organization.organization/UpdateUserInDepartment", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OrganizationServer).UpdateUserInDepartment(ctx, req.(*UpdateUserInDepartmentReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Organization_GetSearchUserList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetSearchUserListReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OrganizationServer).GetSearchUserList(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/OpenIMChat.organization.organization/GetSearchUserList", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OrganizationServer).GetSearchUserList(ctx, req.(*GetSearchUserListReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Organization_SetOrganization_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetOrganizationReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OrganizationServer).SetOrganization(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/OpenIMChat.organization.organization/SetOrganization", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OrganizationServer).SetOrganization(ctx, req.(*SetOrganizationReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Organization_GetOrganization_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetOrganizationReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OrganizationServer).GetOrganization(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/OpenIMChat.organization.organization/GetOrganization", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OrganizationServer).GetOrganization(ctx, req.(*GetOrganizationReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Organization_GetSubDepartment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetSubDepartmentReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OrganizationServer).GetSubDepartment(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/OpenIMChat.organization.organization/GetSubDepartment", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OrganizationServer).GetSubDepartment(ctx, req.(*GetSubDepartmentReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Organization_GetSearchDepartmentUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetSearchDepartmentUserReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OrganizationServer).GetSearchDepartmentUser(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/OpenIMChat.organization.organization/GetSearchDepartmentUser", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OrganizationServer).GetSearchDepartmentUser(ctx, req.(*GetSearchDepartmentUserReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Organization_SortDepartmentList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SortDepartmentListReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OrganizationServer).SortDepartmentList(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/OpenIMChat.organization.organization/SortDepartmentList", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OrganizationServer).SortDepartmentList(ctx, req.(*SortDepartmentListReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Organization_SortOrganizationUserList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SortOrganizationUserListReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OrganizationServer).SortOrganizationUserList(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/OpenIMChat.organization.organization/SortOrganizationUserList", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OrganizationServer).SortOrganizationUserList(ctx, req.(*SortOrganizationUserListReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Organization_CreateNewOrganizationMember_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateNewOrganizationMemberReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OrganizationServer).CreateNewOrganizationMember(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/OpenIMChat.organization.organization/CreateNewOrganizationMember", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OrganizationServer).CreateNewOrganizationMember(ctx, req.(*CreateNewOrganizationMemberReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Organization_GetUserInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetUserInfoReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OrganizationServer).GetUserInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/OpenIMChat.organization.organization/GetUserInfo", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OrganizationServer).GetUserInfo(ctx, req.(*GetUserInfoReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Organization_BatchImport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BatchImportReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OrganizationServer).BatchImport(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/OpenIMChat.organization.organization/BatchImport", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OrganizationServer).BatchImport(ctx, req.(*BatchImportReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Organization_MoveUserDepartment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MoveUserDepartmentReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OrganizationServer).MoveUserDepartment(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/OpenIMChat.organization.organization/MoveUserDepartment", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OrganizationServer).MoveUserDepartment(ctx, req.(*MoveUserDepartmentReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Organization_GetUserFullList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetUserFullListReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OrganizationServer).GetUserFullList(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/OpenIMChat.organization.organization/GetUserFullList", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OrganizationServer).GetUserFullList(ctx, req.(*GetUserFullListReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Organization_SearchUsersFullInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SearchUsersFullInfoReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OrganizationServer).SearchUsersFullInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/OpenIMChat.organization.organization/SearchUsersFullInfo", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OrganizationServer).SearchUsersFullInfo(ctx, req.(*SearchUsersFullInfoReq)) + } + return interceptor(ctx, in, info, handler) +} + +var _Organization_serviceDesc = grpc.ServiceDesc{ + ServiceName: "OpenIMChat.organization.organization", + HandlerType: (*OrganizationServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateDepartment", + Handler: _Organization_CreateDepartment_Handler, + }, + { + MethodName: "UpdateDepartment", + Handler: _Organization_UpdateDepartment_Handler, + }, + { + MethodName: "GetOrganizationDepartment", + Handler: _Organization_GetOrganizationDepartment_Handler, + }, + { + MethodName: "DeleteDepartment", + Handler: _Organization_DeleteDepartment_Handler, + }, + { + MethodName: "GetDepartment", + Handler: _Organization_GetDepartment_Handler, + }, + { + MethodName: "CreateOrganizationUser", + Handler: _Organization_CreateOrganizationUser_Handler, + }, + { + MethodName: "UpdateOrganizationUser", + Handler: _Organization_UpdateOrganizationUser_Handler, + }, + { + MethodName: "DeleteOrganizationUser", + Handler: _Organization_DeleteOrganizationUser_Handler, + }, + { + MethodName: "CreateDepartmentMember", + Handler: _Organization_CreateDepartmentMember_Handler, + }, + { + MethodName: "GetUserInDepartment", + Handler: _Organization_GetUserInDepartment_Handler, + }, + { + MethodName: "DeleteUserInDepartment", + Handler: _Organization_DeleteUserInDepartment_Handler, + }, + { + MethodName: "UpdateUserInDepartment", + Handler: _Organization_UpdateUserInDepartment_Handler, + }, + { + MethodName: "GetSearchUserList", + Handler: _Organization_GetSearchUserList_Handler, + }, + { + MethodName: "SetOrganization", + Handler: _Organization_SetOrganization_Handler, + }, + { + MethodName: "GetOrganization", + Handler: _Organization_GetOrganization_Handler, + }, + { + MethodName: "GetSubDepartment", + Handler: _Organization_GetSubDepartment_Handler, + }, + { + MethodName: "GetSearchDepartmentUser", + Handler: _Organization_GetSearchDepartmentUser_Handler, + }, + { + MethodName: "SortDepartmentList", + Handler: _Organization_SortDepartmentList_Handler, + }, + { + MethodName: "SortOrganizationUserList", + Handler: _Organization_SortOrganizationUserList_Handler, + }, + { + MethodName: "CreateNewOrganizationMember", + Handler: _Organization_CreateNewOrganizationMember_Handler, + }, + { + MethodName: "GetUserInfo", + Handler: _Organization_GetUserInfo_Handler, + }, + { + MethodName: "BatchImport", + Handler: _Organization_BatchImport_Handler, + }, + { + MethodName: "MoveUserDepartment", + Handler: _Organization_MoveUserDepartment_Handler, + }, + { + MethodName: "GetUserFullList", + Handler: _Organization_GetUserFullList_Handler, + }, + { + MethodName: "SearchUsersFullInfo", + Handler: _Organization_SearchUsersFullInfo_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "organization/organization.proto", +} diff --git a/pkg/proto/organization/organization.proto b/pkg/proto/organization/organization.proto new file mode 100644 index 000000000..04efa72c0 --- /dev/null +++ b/pkg/proto/organization/organization.proto @@ -0,0 +1,438 @@ +syntax = "proto3"; +import "common/common.proto"; +option go_package = "github.com/OpenIMSDK/chat/pkg/proto/organization"; +package OpenIMChat.organization; + + +message CreateDepartmentReq{ + OpenIMChat.common.Department departmentInfo = 1; +} + +message CreateDepartmentResp{ + OpenIMChat.common.Department departmentInfo = 1; +} + +message UpdateDepartmentReq{ + OpenIMChat.common.Department departmentInfo = 1; +} + +message UpdateDepartmentResp{ +} + + +message GetOrganizationDepartmentReq{ +} + +message DepartmentInfo { + OpenIMChat.common.Department department = 1; + repeated DepartmentInfo subDepartmentList = 2; +} + + +message GetOrganizationDepartmentResp{ + repeated DepartmentInfo departmentList = 1; +} + +message DeleteDepartmentReq{ + repeated string departmentIDList = 1; +} + +message DeleteDepartmentResp{ +} + +message GetDepartmentParentIDListReq { + string departmentID = 1; +} + +message GetDepartmentParentIDListResp { + repeated string parentIDList = 1; +} + + +message CreateOrganizationUserReq{ + OpenIMChat.common.OrganizationUser organizationUser = 1; +} + + +message CreateOrganizationUserResp{ +} + + +message UpdateOrganizationUserReq{ + OpenIMChat.common.OrganizationUser organizationUser = 1; +} + + +message UpdateOrganizationUserResp{ +} + + + + +message CreateDepartmentMemberReq{ + OpenIMChat.common.DepartmentMember departmentMember = 1; +} +message CreateDepartmentMemberResp{ +} + + +message GetUserInDepartmentReq{ + string userID = 1; +} +message GetUserInDepartmentResp{ + OpenIMChat.common.UserInDepartment userInDepartment = 1; +} + + +message UpdateUserInDepartmentReq{ + OpenIMChat.common.DepartmentMember departmentMember = 1; +} +message UpdateUserInDepartmentResp{ +} + + +message DeleteUserInDepartmentReq{ + string userID = 1; + string departmentID = 2; +} +message DeleteUserInDepartmentResp{ +} + +message DeleteOrganizationUserReq{ + string userID = 1; +} +message DeleteOrganizationUserResp{ +} + + +//message GetDepartmentMemberReq{ +// string operationID = 1; +// string opUserID = 2; +// string departmentID = 3; +//} +// +//message GetDepartmentMemberResp{ +// common.CommonResp commonResp = 1; +// repeated common.UserDepartmentMember userDepartmentMemberList = 3; +//} + +message GetDepartmentRelatedGroupIDListReq { + repeated string departmentIDList = 1; +} + +message GetDepartmentRelatedGroupIDListResp { + repeated string groupIDList = 1; +} + +message GetUserInOrganizationReq{ + repeated string userIDList = 1; +} + +message GetUserInOrganizationResp{ + repeated OpenIMChat.common.OrganizationUser organizationUsers = 1; +} + +// #################################### + +message GetCompleteOrganizationReq { +} + +message CompleteOrganization { + uint32 peopleNumber = 1; + repeated CompleteOrganization list = 2; + string departmentID = 3; + string faceURL = 4; + string name = 5; + string parentID = 6; + int32 order = 7; + int32 departmentType = 8; + uint32 createTime = 9; + string ex = 10; +} + +message GetCompleteOrganizationResp { + repeated CompleteOrganization list = 1; +} + + + +message GetUsersInDepartmentReq{ + repeated string userIDList = 1; +} + +message GetUsersInDepartmentResp{ + repeated OpenIMChat.common.UserInDepartment list = 1; +} + + + + +message GetSearchUserListReq { + uint32 pageNumber = 1; + uint32 showNumber = 2; + string text = 3; + repeated GetSearchUserListSort sorts = 4; + repeated string departmentIDList = 5; + repeated string positionList = 6; + +} + +message GetSearchUserListSort { + string field = 1; + string rule = 2; +} + + +message GetSearchUserListResp { + repeated OpenIMChat.common.UserInDepartment userList = 1; + uint32 Total = 2; +} + + +message SetOrganizationReq { + OpenIMChat.common.Organization organization = 1; +} + +message SetOrganizationResp { +} + +message GetOrganizationReq { +} + +message GetOrganizationResp { + OpenIMChat.common.Organization organization = 1; +} + + + +message GetSubDepartmentReq { + string departmentID = 1; +} + +message GetSubDepartmentResp { + repeated OpenIMChat.common.DepartmentMember departmentMemberList = 1; + repeated OpenIMChat.common.Department departmentList = 2; + repeated OpenIMChat.common.Department departmentDirectoryList = 3; +} + + +message GetSearchDepartmentUserReq { + string keyword = 1; + bool IsGetAllDepartment = 2; +} + + +message GetSearchDepartmentUserOrganizationUser{ + OpenIMChat.common.OrganizationUser organizationUser = 1; + repeated OpenIMChat.common.Department departmentList = 2; + string position = 3; +} + +message GetSearchDepartmentUserResp { + repeated OpenIMChat.common.Department departmentList = 1; + repeated GetSearchDepartmentUserOrganizationUser organizationUserList = 2; +} + +message SortDepartmentListReq { + string departmentID = 1; + string parentID = 2; + string nextDepartmentID = 3; +} + +message SortDepartmentListResp { +} + +message SortOrganizationUserListReq { + string departmentID = 1; + string userID = 2; + string nextUserID = 3; +} + +message SortOrganizationUserListResp { +} + + +message GetDepartmentReq { + string departmentID = 1; +} + +message GetDepartmentResp { + OpenIMChat.common.Department department = 1; +} + + +message CreateNewOrganizationMemberReq { + OpenIMChat.common.OrganizationUser organizationUser = 1; + repeated OpenIMChat.common.DepartmentMember departmentMemberList = 2; + OpenIMChat.common.UserIdentity userIdentity = 3; +} + +message CreateNewOrganizationMemberResp { +} + + +message GetUserInfoReq { + string userID = 1; +} + +message GetUserInfoResp { + OpenIMChat.common.OrganizationUser user = 1; +} + +message BatchImportUserDepartmentName { + repeated string hierarchyName = 1; +} + +message BatchImportUserDepartmentNamePosition { + repeated string hierarchyName = 1; + string position = 2; +} + +message BatchImportUser { + string userID = 1; + string nickname = 2; + string englishName = 3; + string faceURL = 4; + int32 gender = 5; + string mobile = 6; + string telephone = 7; + int64 birth = 8; + string email = 9; + string account = 10; + string password = 11; + repeated BatchImportUserDepartmentNamePosition userDepartmentNameList = 12; + int32 order = 13; + int32 status = 14; + string areaCode = 15; + string station = 16; +} + +message BatchImportDepartment { + string departmentID = 1; + string faceURL = 2; + string name = 3; + string parentID = 4; + int32 order = 5; + int32 departmentType = 6; + string relatedGroupID = 7; + BatchImportUserDepartmentName parentDepartmentName = 11; +} + + +message BatchImportReq { + repeated BatchImportUser userList = 1; + repeated BatchImportDepartment departmentList = 2; + // repeated common.DepartmentMember departmentMemberList = 5; + // repeated common.Organization organizationList = 6; + // string defaultPassword = 7; +} + +message BatchImportResp { +} + +//message BatchExportReq { +// string operationID = 1; +// string opUserID = 2; +//} +// +//message BatchExportResp { +// common.CommonResp commonResp = 1; +// repeated common.OrganizationUser organizationUserList = 2; +// repeated common.Department departmentList = 3; +// repeated common.DepartmentMember departmentMemberList = 4; +// repeated common.Organization organizationList = 5; +//} + +message MoveUserDepartment { + string userID = 1; + string departmentID = 2; + string currentDepartmentID = 3; + string position = 4; + int32 leader = 5; + int32 status = 6; + int64 entryTime = 7; + int64 terminationTime = 8; + int32 order = 9; +} + +message MoveUserDepartmentReq { + repeated MoveUserDepartment moveUserDepartmentList = 1; +} + +message MoveUserDepartmentResp { +} + +message GetUserFullListReq { + int32 pageNumber = 1; + int32 showNumber = 2; + repeated string userIDList = 3; +} + +message GetUserFullListResp { + repeated OpenIMChat.common.OrganizationUser organizationUserList = 1; + int32 total = 2; +} + +message SearchUsersFullInfoReq{ + OpenIMChat.common.Operation operation = 1; + OpenIMChat.common.RequestPagination pagination = 2; + OpenIMChat.common.UserPublicInfo userPublicInfo = 3; + string content = 4; +} + + +message SearchUsersFullInfoResp{ + repeated OpenIMChat.common.OrganizationUser organizationUserList = 1; + int32 total = 2; +} + + +service organization{ + rpc CreateDepartment(CreateDepartmentReq) returns(CreateDepartmentResp); + rpc UpdateDepartment(UpdateDepartmentReq) returns(UpdateDepartmentResp); + rpc GetOrganizationDepartment(GetOrganizationDepartmentReq) returns(GetOrganizationDepartmentResp); + rpc DeleteDepartment(DeleteDepartmentReq) returns(DeleteDepartmentResp); + rpc GetDepartment(GetDepartmentReq) returns(GetDepartmentResp); + + rpc CreateOrganizationUser(CreateOrganizationUserReq) returns(CreateOrganizationUserResp); + rpc UpdateOrganizationUser(UpdateOrganizationUserReq) returns(UpdateOrganizationUserResp); + rpc DeleteOrganizationUser(DeleteOrganizationUserReq) returns(DeleteOrganizationUserResp); + + + rpc CreateDepartmentMember(CreateDepartmentMemberReq) returns(CreateDepartmentMemberResp); + rpc GetUserInDepartment(GetUserInDepartmentReq) returns(GetUserInDepartmentResp); + rpc DeleteUserInDepartment(DeleteUserInDepartmentReq) returns(DeleteUserInDepartmentResp); + rpc UpdateUserInDepartment(UpdateUserInDepartmentReq) returns(UpdateUserInDepartmentResp); + + rpc GetSearchUserList(GetSearchUserListReq) returns(GetSearchUserListResp); + + rpc SetOrganization(SetOrganizationReq) returns(SetOrganizationResp); + rpc GetOrganization(GetOrganizationReq) returns(GetOrganizationResp); + + + rpc GetSubDepartment(GetSubDepartmentReq)returns(GetSubDepartmentResp); + + rpc GetSearchDepartmentUser(GetSearchDepartmentUserReq)returns(GetSearchDepartmentUserResp); + + + rpc SortDepartmentList(SortDepartmentListReq)returns(SortDepartmentListResp); + rpc SortOrganizationUserList(SortOrganizationUserListReq)returns(SortOrganizationUserListResp); + + rpc CreateNewOrganizationMember(CreateNewOrganizationMemberReq) returns(CreateNewOrganizationMemberResp); + + rpc GetUserInfo(GetUserInfoReq)returns(GetUserInfoResp); + + + rpc BatchImport(BatchImportReq)returns(BatchImportResp); + // rpc BatchExport(BatchExportReq)returns(BatchExportResp); + + + rpc MoveUserDepartment(MoveUserDepartmentReq)returns(MoveUserDepartmentResp); + + rpc GetUserFullList(GetUserFullListReq)returns(GetUserFullListResp); + rpc SearchUsersFullInfo(SearchUsersFullInfoReq)returns(SearchUsersFullInfoResp); + +} + + + diff --git a/pkg/proto/pub/sdkws.proto b/pkg/proto/pub/sdkws.proto index 6add465af..315523317 100644 --- a/pkg/proto/pub/sdkws.proto +++ b/pkg/proto/pub/sdkws.proto @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + syntax = "proto3"; package OpenIMServer.sdkws; import "pub/wrapperspb.proto"; diff --git a/pkg/proto/pub/wrapperspb.proto b/pkg/proto/pub/wrapperspb.proto index 768b9fe86..af362c6d4 100644 --- a/pkg/proto/pub/wrapperspb.proto +++ b/pkg/proto/pub/wrapperspb.proto @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + syntax = "proto3"; package OpenIMServer.protobuf; diff --git a/pkg/rpclient/chat/admin.go b/pkg/rpclient/chat/admin.go index b09284370..5246efc81 100644 --- a/pkg/rpclient/chat/admin.go +++ b/pkg/rpclient/chat/admin.go @@ -1,8 +1,24 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package chat import ( "context" + "github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry" + "github.com/OpenIMSDK/chat/pkg/common/config" "github.com/OpenIMSDK/chat/pkg/common/mctx" "github.com/OpenIMSDK/chat/pkg/eerrs" diff --git a/pkg/rpclient/chat/chat.go b/pkg/rpclient/chat/chat.go index c371d4598..e5d423ee3 100644 --- a/pkg/rpclient/chat/chat.go +++ b/pkg/rpclient/chat/chat.go @@ -1,10 +1,26 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package chat import ( "context" + "github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry" "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + "github.com/OpenIMSDK/chat/pkg/common/config" "github.com/OpenIMSDK/chat/pkg/proto/chat" "github.com/OpenIMSDK/chat/pkg/proto/common" @@ -15,21 +31,20 @@ func NewChatClient(discov discoveryregistry.SvcDiscoveryRegistry) *ChatClient { if err != nil { panic(err) } - client := chat.NewChatClient(conn) - return &ChatClient{Client: client} + return &ChatClient{ + client: chat.NewChatClient(conn), + } } type ChatClient struct { - Client chat.ChatClient + client chat.ChatClient } -//type ChatClient Chat - func (o *ChatClient) FindUserPublicInfo(ctx context.Context, userIDs []string) ([]*common.UserPublicInfo, error) { if len(userIDs) == 0 { return []*common.UserPublicInfo{}, nil } - resp, err := o.Client.FindUserPublicInfo(ctx, &chat.FindUserPublicInfoReq{UserIDs: userIDs}) + resp, err := o.client.FindUserPublicInfo(ctx, &chat.FindUserPublicInfoReq{UserIDs: userIDs}) if err != nil { return nil, err } @@ -50,7 +65,7 @@ func (o *ChatClient) FindUserFullInfo(ctx context.Context, userIDs []string) ([] if len(userIDs) == 0 { return []*common.UserFullInfo{}, nil } - resp, err := o.Client.FindUserFullInfo(ctx, &chat.FindUserFullInfoReq{UserIDs: userIDs}) + resp, err := o.client.FindUserFullInfo(ctx, &chat.FindUserFullInfoReq{UserIDs: userIDs}) if err != nil { return nil, err } @@ -92,6 +107,20 @@ func (o *ChatClient) GetUserPublicInfo(ctx context.Context, userID string) (*com } func (o *ChatClient) UpdateUser(ctx context.Context, req *chat.UpdateUserInfoReq) error { - _, err := o.Client.UpdateUserInfo(ctx, req) + _, err := o.client.UpdateUserInfo(ctx, req) return err } + +func (o *ChatClient) GetAccountUser(ctx context.Context, opUserID string, operationID string, account string) (*chat.GetAccountUserResp, error) { + resp, err := o.client.GetAccountUser(ctx, &chat.GetAccountUserReq{ + Operation: &common.Operation{ + OpUserID: opUserID, + OperationID: operationID, + }, + AccountList: []string{account}, + }) + if err != nil { + return nil, err + } + return resp, nil +} diff --git a/pkg/rpclient/openim/openim.go b/pkg/rpclient/openim/openim.go index 6b4395e85..beb6350e6 100644 --- a/pkg/rpclient/openim/openim.go +++ b/pkg/rpclient/openim/openim.go @@ -2,86 +2,70 @@ package openim import ( "context" - "fmt" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" "github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry" - "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/auth" "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/friend" "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/group" + "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/msg" "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/user" ) -func NewOpenIMClient(zk discoveryregistry.SvcDiscoveryRegistry) *OpenIMClient { - return &OpenIMClient{ - zk: zk, +func NewOpenIMClient(discov discoveryregistry.SvcDiscoveryRegistry) *OpenIMClient { + ctx := context.Background() + userConn, err := discov.GetConn(ctx, config.Config.RpcRegisterName.OpenImUserName) + if err != nil { + panic(err) } -} - -type OpenIMClient struct { - zk discoveryregistry.SvcDiscoveryRegistry -} - -func (o *OpenIMClient) getUserClient(ctx context.Context) (user.UserClient, error) { - conn, err := o.zk.GetConn(ctx, config.Config.RpcRegisterName.OpenImUserName) + friendConn, err := discov.GetConn(ctx, config.Config.RpcRegisterName.OpenImFriendName) if err != nil { - return nil, err + panic(err) } - return user.NewUserClient(conn), nil -} - -func (o *OpenIMClient) getFriendClient(ctx context.Context) (friend.FriendClient, error) { - conn, err := o.zk.GetConn(ctx, config.Config.RpcRegisterName.OpenImFriendName) + groupConn, err := discov.GetConn(ctx, config.Config.RpcRegisterName.OpenImGroupName) if err != nil { - return nil, err + panic(err) } - return friend.NewFriendClient(conn), nil -} - -func (o *OpenIMClient) getGroupClient(ctx context.Context) (group.GroupClient, error) { - conn, err := o.zk.GetConn(ctx, config.Config.RpcRegisterName.OpenImGroupName) + authConn, err := discov.GetConn(ctx, config.Config.RpcRegisterName.OpenImAuthName) if err != nil { - return nil, err + panic(err) } - return group.NewGroupClient(conn), nil -} - -func (o *OpenIMClient) getAuthClient(ctx context.Context) (auth.AuthClient, error) { - name := config.Config.RpcRegisterName.OpenImAuthName - conn, err := o.zk.GetConn(ctx, name) + msgConn, err := discov.GetConn(ctx, config.Config.RpcRegisterName.OpenImMsgName) if err != nil { - return nil, errs.ErrInternalServer.Wrap(fmt.Sprintf("get auth <%s> client failed: %s", name, err)) + panic(err) } - return auth.NewAuthClient(conn), nil + return &OpenIMClient{ + msg: msg.NewMsgClient(msgConn), + auth: auth.NewAuthClient(authConn), + user: user.NewUserClient(userConn), + group: group.NewGroupClient(groupConn), + friend: friend.NewFriendClient(friendConn), + } +} + +type OpenIMClient struct { + msg msg.MsgClient + auth auth.AuthClient + user user.UserClient + group group.GroupClient + friend friend.FriendClient } func (o *OpenIMClient) UpdateUser(ctx context.Context, req *user.UpdateUserInfoReq) error { - client, err := o.getUserClient(ctx) - if err != nil { - return err - } - _, err = client.UpdateUserInfo(ctx, req) + _, err := o.user.UpdateUserInfo(ctx, req) return err } func (o *OpenIMClient) UserRegister(ctx context.Context, req *sdkws.UserInfo) error { - client, err := o.getUserClient(ctx) - if err != nil { - return err - } - _, err = client.UserRegister(ctx, &user.UserRegisterReq{Users: []*sdkws.UserInfo{req}}) + _, err := o.user.UserRegister(ctx, &user.UserRegisterReq{Secret: config.Config.Secret, Users: []*sdkws.UserInfo{req}}) return err } func (o *OpenIMClient) AddDefaultFriend(ctx context.Context, userID string, friendUserIDs []string) error { - client, err := o.getFriendClient(ctx) - if err != nil { - return err - } - _, err = client.ImportFriends(ctx, &friend.ImportFriendReq{ + _, err := o.friend.ImportFriends(ctx, &friend.ImportFriendReq{ OwnerUserID: userID, FriendUserIDs: friendUserIDs, }) @@ -89,11 +73,7 @@ func (o *OpenIMClient) AddDefaultFriend(ctx context.Context, userID string, frie } func (o *OpenIMClient) AddDefaultGroup(ctx context.Context, userID string, groupID string) error { - client, err := o.getGroupClient(ctx) - if err != nil { - return err - } - _, err = client.InviteUserToGroup(ctx, &group.InviteUserToGroupReq{ + _, err := o.group.InviteUserToGroup(ctx, &group.InviteUserToGroupReq{ GroupID: groupID, Reason: "", InvitedUserIDs: []string{userID}, @@ -102,19 +82,11 @@ func (o *OpenIMClient) AddDefaultGroup(ctx context.Context, userID string, group } func (o *OpenIMClient) UserToken(ctx context.Context, userID string, platformID int32) (*auth.UserTokenResp, error) { - client, err := o.getAuthClient(ctx) - if err != nil { - return nil, err - } - return client.UserToken(ctx, &auth.UserTokenReq{PlatformID: platformID, UserID: userID}) + return o.auth.UserToken(ctx, &auth.UserTokenReq{Secret: config.Config.Secret, PlatformID: platformID, UserID: userID}) } func (o *OpenIMClient) FindGroup(ctx context.Context, groupIDs []string) ([]*sdkws.GroupInfo, error) { - client, err := o.getGroupClient(ctx) - if err != nil { - return nil, err - } - resp, err := client.GetGroupsInfo(ctx, &group.GetGroupsInfoReq{GroupIDs: groupIDs}) + resp, err := o.group.GetGroupsInfo(ctx, &group.GetGroupsInfoReq{GroupIDs: groupIDs}) if err != nil { return nil, err } @@ -134,12 +106,8 @@ func (o *OpenIMClient) MapGroup(ctx context.Context, groupIDs []string) (map[str } func (o *OpenIMClient) ForceOffline(ctx context.Context, userID string) error { - client, err := o.getAuthClient(ctx) - if err != nil { - return err - } for id := range constant.PlatformID2Name { - _, err := client.ForceLogout(ctx, &auth.ForceLogoutReq{ + _, err := o.auth.ForceLogout(ctx, &auth.ForceLogoutReq{ PlatformID: int32(id), UserID: userID, }) @@ -151,13 +119,21 @@ func (o *OpenIMClient) ForceOffline(ctx context.Context, userID string) error { } func (o *OpenIMClient) GetGroupMemberID(ctx context.Context, groupID string) ([]string, error) { - client, err := o.getGroupClient(ctx) + resp, err := o.group.GetGroupMemberUserIDs(ctx, &group.GetGroupMemberUserIDsReq{GroupID: groupID}) if err != nil { return nil, err } - resp, err := client.GetGroupMemberUserIDs(ctx, &group.GetGroupMemberUserIDsReq{GroupID: groupID}) + return resp.UserIDs, nil +} + +func (o *OpenIMClient) GetFriendID(ctx context.Context, userID string) ([]string, error) { + resp, err := o.friend.GetFriendIDs(ctx, &friend.GetFriendIDsReq{UserID: userID}) if err != nil { return nil, err } - return resp.UserIDs, nil + return resp.FriendIDs, nil +} + +func (o *OpenIMClient) SendMsg(ctx context.Context, req *msg.SendMsgReq) (*msg.SendMsgResp, error) { + return o.msg.SendMsg(ctx, req) } diff --git a/pkg/rpclient/organization/organization.go b/pkg/rpclient/organization/organization.go new file mode 100644 index 000000000..2a1170f12 --- /dev/null +++ b/pkg/rpclient/organization/organization.go @@ -0,0 +1,22 @@ +package organization + +import ( + "context" + "github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry" + "github.com/OpenIMSDK/chat/pkg/common/config" + "github.com/OpenIMSDK/chat/pkg/proto/organization" +) + +type OrgClient struct { + client organization.OrganizationClient +} + +func NewOrgClient(discov discoveryregistry.SvcDiscoveryRegistry) *OrgClient { + conn, err := discov.GetConn(context.Background(), config.Config.RpcRegisterName.OpenImOrganizationName) + if err != nil { + panic(err) + } + return &OrgClient{ + client: organization.NewOrganizationClient(conn), + } +} diff --git a/pkg/sms/ali.go b/pkg/sms/ali.go index 55fb8baaf..c9891efbe 100644 --- a/pkg/sms/ali.go +++ b/pkg/sms/ali.go @@ -1,13 +1,29 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package sms import ( "context" "encoding/json" + "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" - "github.com/OpenIMSDK/chat/pkg/common/config" aliconf "github.com/alibabacloud-go/darabonba-openapi/client" dysmsapi "github.com/alibabacloud-go/dysmsapi-20170525/v2/client" "github.com/alibabacloud-go/tea/tea" + + "github.com/OpenIMSDK/chat/pkg/common/config" ) func newAli() (SMS, error) { diff --git a/pkg/sms/sms.go b/pkg/sms/sms.go index a9fa30df1..ba3a91429 100644 --- a/pkg/sms/sms.go +++ b/pkg/sms/sms.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM open source community. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package sms import ( @@ -10,11 +24,11 @@ import ( func New() (SMS, error) { switch strings.ToLower(config.Config.VerifyCode.Use) { case "": - return nil, nil + return empty{}, nil case "ali": return newAli() default: - return nil, fmt.Errorf("not support sms: %s", config.Config.VerifyCode.Use) + return nil, fmt.Errorf("not support sms: `%s`", config.Config.VerifyCode.Use) } } @@ -22,3 +36,13 @@ type SMS interface { Name() string SendCode(ctx context.Context, areaCode string, phoneNumber string, verifyCode string) error } + +type empty struct{} + +func (e empty) Name() string { + return "empty-sms" +} + +func (e empty) SendCode(ctx context.Context, areaCode string, phoneNumber string, verifyCode string) error { + return nil +} diff --git a/script/build_docker.sh b/script/build_docker.sh deleted file mode 100755 index cd74382b7..000000000 --- a/script/build_docker.sh +++ /dev/null @@ -1,7 +0,0 @@ -image=openim/open_im_enterprise:v1.0.2 -chmod +x ./*.sh -./build_all_service.sh -cd ../ -docker build -t $image . -f ./deploy.Dockerfile -docker push $image -echo "build ok" diff --git a/script/docker_start_all.sh b/script/docker_start_all.sh deleted file mode 100755 index b5e8a1849..000000000 --- a/script/docker_start_all.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env bash - -chmod +x ./*.sh -./start_all.sh -i=1 -while ((i == 1)) -do - sleep 5 -done \ No newline at end of file diff --git a/script/function.sh b/script/function.sh deleted file mode 100755 index 97f19187a..000000000 --- a/script/function.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env bash -#input:[10023,2323,3434] -#output:10023 2323 3434 -list_to_string(){ -ports_list=$* -sub_s1=`echo $ports_list | sed 's/ //g'` -sub_s2=${sub_s1//,/ } -sub_s3=${sub_s2#*[} -sub_s4=${sub_s3%]*} -ports_array=$sub_s4 -} -remove_space(){ - value=$* - result=`echo $value | sed 's/ //g'` -} \ No newline at end of file diff --git a/script/stop_all.sh b/script/stop_all.sh deleted file mode 100755 index 2e1e119c1..000000000 --- a/script/stop_all.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env bash -#fixme This script is to stop the service - -source ./style_info.cfg -source ./path_info.cfg - - -for i in ${service_names[*]}; do - #Check whether the service exists - name="ps -aux |grep -w $i |grep -v grep" - count="${name}| wc -l" - if [ $(eval ${count}) -gt 0 ]; then - pid="${name}| awk '{print \$2}'" - echo -e "${SKY_BLUE_PREFIX}Killing service:$i pid:$(eval $pid)${COLOR_SUFFIX}" - #kill the service that existed - kill -9 $(eval $pid) - echo -e "${SKY_BLUE_PREFIX}service:$i was killed ${COLOR_SUFFIX}" - fi -done diff --git a/scripts/LICENSE/LICENSE b/scripts/LICENSE/LICENSE new file mode 100644 index 000000000..261eeb9e9 --- /dev/null +++ b/scripts/LICENSE/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/scripts/LICENSE/LICENSE_TEMPLATES b/scripts/LICENSE/LICENSE_TEMPLATES new file mode 100644 index 000000000..dbc5ce2c8 --- /dev/null +++ b/scripts/LICENSE/LICENSE_TEMPLATES @@ -0,0 +1,13 @@ +Copyright © {{.Year}} {{.Holder}} All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/script/admin_rpc_start.sh b/scripts/admin_rpc_start.sh old mode 100755 new mode 100644 similarity index 73% rename from script/admin_rpc_start.sh rename to scripts/admin_rpc_start.sh index cbaffe7be..d1a9724ea --- a/script/admin_rpc_start.sh +++ b/scripts/admin_rpc_start.sh @@ -1,4 +1,18 @@ #!/usr/bin/env bash +# Copyright © 2023 OpenIM open source community. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + #Include shell font styles and some basic information source ./style_info.cfg source ./path_info.cfg diff --git a/script/build_all_service.sh b/scripts/build_all_service.sh old mode 100755 new mode 100644 similarity index 57% rename from script/build_all_service.sh rename to scripts/build_all_service.sh index 0d9814bec..b56312bba --- a/script/build_all_service.sh +++ b/scripts/build_all_service.sh @@ -1,4 +1,18 @@ #!/usr/bin/env bash +# Copyright © 2023 OpenIM open source community. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + source ./style_info.cfg source ./path_info.cfg diff --git a/scripts/build_docker.sh b/scripts/build_docker.sh new file mode 100644 index 000000000..7c2b59679 --- /dev/null +++ b/scripts/build_docker.sh @@ -0,0 +1,21 @@ +# Copyright © 2023 OpenIM open source community. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +image=openim/openim_chat:v1.0.2 +chmod +x ./*.sh +./build_all_service.sh +cd ../ +docker build -t $image . -f ./deploy.Dockerfile +docker push $image +echo "build ok" diff --git a/script/check_all.sh b/scripts/check_all.sh old mode 100755 new mode 100644 similarity index 59% rename from script/check_all.sh rename to scripts/check_all.sh index 7bcec3b5f..e73c793c7 --- a/script/check_all.sh +++ b/scripts/check_all.sh @@ -1,4 +1,18 @@ #!/usr/bin/env bash +# Copyright © 2023 OpenIM open source community. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + source ./style_info.cfg source ./path_info.cfg @@ -9,6 +23,7 @@ service_port_name=( #api port name openImAdminPort openImChatPort + openImOrganizationPort ) switch=$(cat $config_path | grep demoswitch |awk -F '[:]' '{print $NF}') for i in ${service_port_name[*]}; do diff --git a/scripts/docker_start_all.sh b/scripts/docker_start_all.sh new file mode 100644 index 000000000..22a30e260 --- /dev/null +++ b/scripts/docker_start_all.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash +# Copyright © 2023 OpenIM open source community. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +chmod +x ./*.sh +./start_all.sh +i=1 +while ((i == 1)) +do + sleep 5 +done \ No newline at end of file diff --git a/scripts/function.sh b/scripts/function.sh new file mode 100644 index 000000000..4b51e8df3 --- /dev/null +++ b/scripts/function.sh @@ -0,0 +1,29 @@ +#!/usr/bin/env bash +# Copyright © 2023 OpenIM open source community. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +#input:[10023,2323,3434] +#output:10023 2323 3434 +list_to_string(){ +ports_list=$* +sub_s1=`echo $ports_list | sed 's/ //g'` +sub_s2=${sub_s1//,/ } +sub_s3=${sub_s2#*[} +sub_s4=${sub_s3%]*} +ports_array=$sub_s4 +} +remove_space(){ + value=$* + result=`echo $value | sed 's/ //g'` +} \ No newline at end of file diff --git a/scripts/githooks/commit-msg b/scripts/githooks/commit-msg new file mode 100644 index 000000000..eede298a0 --- /dev/null +++ b/scripts/githooks/commit-msg @@ -0,0 +1,77 @@ +#!/usr/bin/env bash +# Copyright © 2023 OpenIMSDK. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# ============================================================================== +# +# Store this file as .git/hooks/commit-msg in your repository in order to +# enforce checking for proper commit message format before actual commits. +# You may need to make the script executable by 'chmod +x .git/hooks/commit-msg'. + +# commit-msg use go-gitlint tool, install go-gitlint via `go get github.com/llorllale/go-gitlint/cmd/go-gitlint` +# go-gitlint --msg-file="$1" + +# An example hook script to check the commit log message. +# Called by "git commit" with one argument, the name of the file +# that has the commit message. The hook should exit with non-zero +# status after issuing an appropriate message if it wants to stop the +# commit. The hook is allowed to edit the commit message file. + +YELLOW="\e[93m" +GREEN="\e[32m" +RED="\e[31m" +ENDCOLOR="\e[0m" + +printMessage() { + printf "${YELLOW}OpenIM : $1${ENDCOLOR}\n" +} + +printSuccess() { + printf "${GREEN}OpenIM : $1${ENDCOLOR}\n" +} + +printError() { + printf "${RED}OpenIM : $1${ENDCOLOR}\n" +} + +printMessage "Running the OpenIM commit-msg hook." + +# This example catches duplicate Signed-off-by lines. + +test "" = "$(grep '^Signed-off-by: ' "$1" | + sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { + echo >&2 Duplicate Signed-off-by lines. + exit 1 +} + +# TODO: go-gitlint dir set +GITLINT_DIR="./_output/tools/go-gitlint" + +$GITLINT_DIR \ + --msg-file=$1 \ + --subject-regex="^(build|chore|ci|docs|feat|feature|fix|perf|refactor|revert|style|test)(.*)?:\s?.*" \ + --subject-maxlen=150 \ + --subject-minlen=10 \ + --body-regex=".*" \ + --max-parents=1 + +if [ $? -ne 0 ] +then + if ! command -v $GITLINT_DIR &>/dev/null; then + printError "$GITLINT_DIR not found. Please run 'make tools' OR 'make tools.verify.go-gitlint' make verto install it." + fi + printError "Please fix your commit message to match kubecub coding standards" + printError "https://gist.github.com/cubxxw/126b72104ac0b0ca484c9db09c3e5694#file-githook-md" + exit 1 +fi \ No newline at end of file diff --git a/scripts/githooks/pre-commit b/scripts/githooks/pre-commit new file mode 100644 index 000000000..2648aa34c --- /dev/null +++ b/scripts/githooks/pre-commit @@ -0,0 +1,98 @@ +#!/usr/bin/env bash +# Copyright © 2023 OpenIMSDK. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# ============================================================================== +# This is a pre-commit hook that ensures attempts to commit files that are +# are larger than $limit to your _local_ repo fail, with a helpful error message. + +# You can override the default limit of 2MB by supplying the environment variable: +# GIT_FILE_SIZE_LIMIT=50000000 git commit -m "test: this commit is allowed file sizes up to 50MB" +# +# ============================================================================== +# + +YELLOW="\e[93m" +GREEN="\e[32m" +RED="\e[31m" +ENDCOLOR="\e[0m" + +printMessage() { + printf "${YELLOW}OpenIM : $1${ENDCOLOR}\n" +} + +printSuccess() { + printf "${GREEN}OpenIM : $1${ENDCOLOR}\n" +} + +printError() { + printf "${RED}OpenIM : $1${ENDCOLOR}\n" +} + +printMessage "Running local OpenIM pre-commit hook." + +# flutter format . +# https://gist.github.com/cubxxw/126b72104ac0b0ca484c9db09c3e5694#file-githook-md +# TODO! GIT_FILE_SIZE_LIMIT=50000000 git commit -m "test: this commit is allowed file sizes up to 50MB" +# Maximum file size limit in bytes +limit=${GIT_FILE_SIZE_LIMIT:-2000000} # Default 2MB +limitInMB=$(( $limit / 1000000 )) + +function file_too_large(){ + filename=$0 + filesize=$(( $1 / 2**20 )) + + cat < /dev/null 2>&1 +then + against=HEAD +else + against="$empty_tree" +fi + +# Set split so that for loop below can handle spaces in file names by splitting on line breaks +IFS=' +' + +shouldFail=false +for file in $( git diff-index --cached --name-only $against ); do + file_size=$(([ ! -f $file ] && echo 0) || (ls -la $file | awk '{ print $5 }')) + if [ "$file_size" -gt "$limit" ]; then + printError "File $file is $(( $file_size / 10**6 )) MB, which is larger than our configured limit of $limitInMB MB" + shouldFail=true + fi +done + +if $shouldFail +then + printMessage "If you really need to commit this file, you can override the size limit by setting the GIT_FILE_SIZE_LIMIT environment variable, e.g. GIT_FILE_SIZE_LIMIT=42000000 for 42MB. Or, commit with the --no-verify switch to skip the check entirely." + printError "Commit aborted" + exit 1; +fi \ No newline at end of file diff --git a/scripts/githooks/pre-push b/scripts/githooks/pre-push new file mode 100644 index 000000000..ef1b5b1fe --- /dev/null +++ b/scripts/githooks/pre-push @@ -0,0 +1,52 @@ +#!/usr/bin/env bash +# Copyright © 2023 OpenIMSDK. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# ============================================================================== +# + +YELLOW="\e[93m" +GREEN="\e[32m" +RED="\e[31m" +ENDCOLOR="\e[0m" + +printMessage() { + printf "${YELLOW}OpenIM : $1${ENDCOLOR}\n" +} + +printSuccess() { + printf "${GREEN}OpenIM : $1${ENDCOLOR}\n" +} + +printError() { + printf "${RED}OpenIM : $1${ENDCOLOR}\n" +} + +printMessage "Running local OpenIM pre-push hook." + +if [[ `git status --porcelain` ]]; then + printError "This script needs to run against committed code only. Please commit or stash you changes." + exit 1 +fi + +# +#printMessage "Running the Flutter analyzer" +#flutter analyze +# +#if [ $? -ne 0 ]; then +# printError "Flutter analyzer error" +# exit 1 +#fi +# +#printMessage "Finished running the Flutter analyzer" diff --git a/script/path_info.cfg b/scripts/path_info.cfg similarity index 82% rename from script/path_info.cfg rename to scripts/path_info.cfg index 8e674d955..9f86bb8b1 100644 --- a/script/path_info.cfg +++ b/scripts/path_info.cfg @@ -12,11 +12,12 @@ config_path="../config/config.yaml" #servicefile dir path service_source_root=( #api service file - ../cmd/api/chat/ - ../cmd/api/admin/ + ../cmd/api/chat_api/ + ../cmd/api/admin_api/ #rpc service file ../cmd/rpc/admin/ ../cmd/rpc/chat/ + ../cmd/rpc/organization/ ) #service filename service_names=( @@ -26,7 +27,5 @@ service_names=( #rpc service filename open_im_admin open_im_chat + open_im_organization ) - - - diff --git a/script/start_all.sh b/scripts/start_all.sh old mode 100755 new mode 100644 similarity index 71% rename from script/start_all.sh rename to scripts/start_all.sh index 061a42a5f..a4ad5cd40 --- a/script/start_all.sh +++ b/scripts/start_all.sh @@ -1,4 +1,18 @@ #!/usr/bin/env bash +# Copyright © 2023 OpenIM open source community. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + source ./style_info.cfg source ./path_info.cfg @@ -11,6 +25,7 @@ service_filename=( #rpc open_im_admin open_im_chat + open_im_organization ) #service config port name @@ -20,6 +35,7 @@ openImAdminApiPort #api port name openImAdminPort openImChatPort + openImOrganizationPort ) service_prometheus_port_name=( diff --git a/scripts/stop_all.sh b/scripts/stop_all.sh new file mode 100644 index 000000000..0953b0067 --- /dev/null +++ b/scripts/stop_all.sh @@ -0,0 +1,33 @@ +#!/usr/bin/env bash +# Copyright © 2023 OpenIM open source community. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +#fixme This scripts is to stop the service + +source ./style_info.cfg +source ./path_info.cfg + + +for i in ${service_names[*]}; do + #Check whether the service exists + name="ps -aux |grep -w $i |grep -v grep" + count="${name}| wc -l" + if [ $(eval ${count}) -gt 0 ]; then + pid="${name}| awk '{print \$2}'" + echo -e "${SKY_BLUE_PREFIX}Killing service:$i pid:$(eval $pid)${COLOR_SUFFIX}" + #kill the service that existed + kill -9 $(eval $pid) + echo -e "${SKY_BLUE_PREFIX}service:$i was killed ${COLOR_SUFFIX}" + fi +done diff --git a/script/style_info.cfg b/scripts/style_info.cfg similarity index 100% rename from script/style_info.cfg rename to scripts/style_info.cfg diff --git a/test.md b/test.md new file mode 100644 index 000000000..1b569e59d --- /dev/null +++ b/test.md @@ -0,0 +1,58 @@ +# organization rpc测试 + +## CreateDepartment + +postman 输入: +``` +{ + "operationID":"abcd", + "OpUserID":"sdf", + "DepartmentInfo": { + "state": null, + "sizeCache": null, + "unknownFields": null, + "departmentID": "", + "faceURL": "", + "name": "", + "parentID": "", + "order": 0, + "departmentType": 0, + "relatedGroupID": "", + "createTime": 0, + "memberNum": 0, + "position": "" + } +} +``` +输出: +``` +{ + "errCode": 0, + "errMsg": "", + "errDlt": "", + "data": { + "commonResp": { + "errCode": 0, + "errMsg": "" + }, + "departmentInfo": { + "departmentID": "", + "faceURL": "", + "name": "", + "parentID": "", + "order": 0, + "departmentType": 0, + "relatedGroupID": "", + "createTime": 0, + "memberNum": 0, + "position": "" + } + } +} +``` +## UpdateDepartment + + ``` + + ``` +