From 21789bd7ac8cea24fd660fd8468f6c3c50dbab4d Mon Sep 17 00:00:00 2001 From: "Xinwei Xiong(cubxxw-openim)" <3293172751nss@gmail.com> Date: Tue, 4 Jul 2023 11:15:20 +0800 Subject: [PATCH] feat: add copyright Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> --- .docker-compose_cfg/grafana.ini | 2 +- cmd/api/deploy.Dockerfile | 14 + cmd/api/main.go | 14 + cmd/cmdutils/main.go | 14 + cmd/crontask/deploy.Dockerfile | 14 + cmd/crontask/main.go | 14 + cmd/msggateway/deploy.Dockerfile | 14 + cmd/msggateway/main.go | 14 + cmd/msgtransfer/deploy.Dockerfile | 14 + cmd/msgtransfer/main.go | 14 + cmd/push/deploy.Dockerfile | 14 + cmd/push/main.go | 14 + cmd/rpc/auth/deploy.Dockerfile | 14 + cmd/rpc/auth/main.go | 14 + cmd/rpc/conversation/deploy.Dockerfile | 14 + cmd/rpc/conversation/main.go | 14 + cmd/rpc/friend/deploy.Dockerfile | 14 + cmd/rpc/friend/main.go | 14 + cmd/rpc/group/deploy.Dockerfile | 14 + cmd/rpc/group/main.go | 14 + cmd/rpc/msg/deploy.Dockerfile | 14 + cmd/rpc/msg/main.go | 14 + cmd/rpc/third/deploy.Dockerfile | 14 + cmd/rpc/third/main.go | 14 + cmd/rpc/user/deploy.Dockerfile | 14 + cmd/rpc/user/main.go | 14 + config/config.yaml | 14 + config/notification.yaml | 14 + internal/api/auth.go | 14 + internal/api/conversation.go | 14 + internal/api/custom_validator.go | 14 + internal/api/friend.go | 14 + internal/api/group.go | 14 + internal/api/msg.go | 14 + internal/api/route.go | 14 + internal/api/statistics.go | 14 + internal/api/third.go | 14 + internal/api/user.go | 14 + internal/msggateway/callback.go | 14 + internal/msggateway/client.go | 14 + internal/msggateway/compressor.go | 14 + internal/msggateway/constant.go | 14 + internal/msggateway/context.go | 14 + internal/msggateway/encoder.go | 14 + internal/msggateway/http_error.go | 14 + internal/msggateway/hub_server.go | 14 + internal/msggateway/init.go | 14 + internal/msggateway/long_conn.go | 14 + internal/msggateway/message_handler.go | 14 + internal/msggateway/n_ws_server.go | 14 + internal/msggateway/options.go | 14 + internal/msggateway/user_map.go | 14 + internal/msgtransfer/init.go | 14 + internal/msgtransfer/modify_msg_handler.go | 14 + .../msgtransfer/online_history_msg_handler.go | 14 + .../online_msg_to_mongo_handler.go | 14 + internal/push/callback.go | 14 + internal/push/consumer_init.go | 14 + internal/push/offlinepush/fcm/push.go | 14 + internal/push/offlinepush/fcm/push_test.go | 14 + internal/push/offlinepush/getui/body.go | 14 + internal/push/offlinepush/getui/push.go | 14 + .../push/offlinepush/jpush/body/audience.go | 14 + .../push/offlinepush/jpush/body/message.go | 14 + .../offlinepush/jpush/body/notification.go | 14 + .../push/offlinepush/jpush/body/options.go | 14 + .../push/offlinepush/jpush/body/platform.go | 14 + .../push/offlinepush/jpush/body/pushobj.go | 14 + internal/push/offlinepush/jpush/push.go | 14 + .../push/offlinepush/offlinepush_interface.go | 14 + internal/push/push_handler.go | 14 + internal/push/push_rpc_server.go | 14 + internal/push/push_to_client.go | 14 + internal/rpc/auth/auth.go | 14 + internal/rpc/conversation/conversaion.go | 14 + internal/rpc/friend/black.go | 14 + internal/rpc/friend/callback.go | 14 + internal/rpc/friend/friend.go | 14 + internal/rpc/group/cache.go | 14 + internal/rpc/group/callback.go | 14 + internal/rpc/group/convert.go | 14 + internal/rpc/group/db_map.go | 14 + internal/rpc/group/fill.go | 14 + internal/rpc/group/group.go | 14 + internal/rpc/group/super_group.go | 14 + internal/rpc/msg/as_read.go | 14 + internal/rpc/msg/callback.go | 14 + internal/rpc/msg/delete.go | 14 + internal/rpc/msg/extend_msg.go | 14 + internal/rpc/msg/extend_msg_callback.go | 14 + internal/rpc/msg/lock.go | 14 + internal/rpc/msg/message_interceptor.go | 14 + internal/rpc/msg/msg_status.go | 14 + internal/rpc/msg/revoke.go | 14 + internal/rpc/msg/send.go | 14 + internal/rpc/msg/seq.go | 14 + internal/rpc/msg/server.go | 14 + internal/rpc/msg/sync_msg.go | 14 + internal/rpc/msg/utils.go | 14 + internal/rpc/msg/verify.go | 14 + internal/rpc/statistics/statistics.go | 14 + internal/rpc/third/s3.go | 14 + internal/rpc/third/third.go | 14 + internal/rpc/user/statistics.go | 14 + internal/rpc/user/user.go | 14 + internal/tools/cron_task.go | 14 + internal/tools/msg.go | 14 + internal/tools/msg_test.go | 14 + pkg/a2r/api2rpc.go | 14 + pkg/apiresp/gin.go | 14 + pkg/apiresp/http.go | 14 + pkg/apiresp/resp.go | 14 + pkg/apistruct/auth.go | 14 + pkg/apistruct/aws.go | 14 + pkg/apistruct/conversation.go | 14 + pkg/apistruct/cos.go | 14 + pkg/apistruct/friend.go | 14 + pkg/apistruct/group.go | 14 + pkg/apistruct/manage.go | 14 + pkg/apistruct/msg.go | 14 + pkg/apistruct/oss.go | 14 + pkg/apistruct/pagination.go | 14 + pkg/apistruct/public.go | 14 + pkg/apistruct/super_group.go | 14 + pkg/apistruct/third.go | 14 + pkg/callbackstruct/common.go | 14 + pkg/callbackstruct/friend.go | 14 + pkg/callbackstruct/group.go | 14 + pkg/callbackstruct/message.go | 14 + pkg/callbackstruct/msg_gateway.go | 14 + pkg/callbackstruct/push.go | 14 + pkg/checker/check.go | 14 + pkg/common/cmd/api.go | 14 + pkg/common/cmd/cron_task.go | 14 + pkg/common/cmd/msg_gateway.go | 14 + pkg/common/cmd/msg_transfer.go | 14 + pkg/common/cmd/msg_utils.go | 14 + pkg/common/cmd/root.go | 14 + pkg/common/cmd/rpc.go | 14 + pkg/common/config/config.go | 14 + pkg/common/config/parse.go | 14 + pkg/common/constant/constant.go | 14 + pkg/common/constant/limit.go | 14 + pkg/common/constant/platform_id_to_name.go | 14 + pkg/common/convert/black.go | 14 + pkg/common/convert/conversation.go | 14 + pkg/common/convert/friend.go | 14 + pkg/common/convert/group.go | 14 + pkg/common/convert/msg.go | 14 + pkg/common/convert/user.go | 14 + pkg/common/db/cache/black.go | 14 + pkg/common/db/cache/conversation.go | 14 + pkg/common/db/cache/extend_msg_set.go | 14 + pkg/common/db/cache/friend.go | 14 + pkg/common/db/cache/group.go | 14 + pkg/common/db/cache/init_redis.go | 14 + pkg/common/db/cache/meta_cache.go | 14 + pkg/common/db/cache/msg.go | 14 + pkg/common/db/cache/user.go | 14 + pkg/common/db/controller/auth.go | 14 + pkg/common/db/controller/black.go | 14 + pkg/common/db/controller/chatlog.go | 14 + pkg/common/db/controller/conversation.go | 14 + pkg/common/db/controller/extend_msg.go | 14 + pkg/common/db/controller/friend.go | 14 + pkg/common/db/controller/group.go | 14 + pkg/common/db/controller/msg.go | 14 + pkg/common/db/controller/msg_test.go | 14 + pkg/common/db/controller/push.go | 14 + pkg/common/db/controller/storage.go | 14 + pkg/common/db/controller/third.go | 14 + pkg/common/db/controller/user.go | 14 + pkg/common/db/localcache/conversation.go | 14 + pkg/common/db/localcache/group.go | 14 + pkg/common/db/localcache/meta_local_cache.go | 14 + pkg/common/db/obj/minio.go | 14 + pkg/common/db/obj/obj.go | 14 + pkg/common/db/ormutil/utils.go | 14 + pkg/common/db/relation/black_model.go | 14 + pkg/common/db/relation/chat_log_model.go | 14 + pkg/common/db/relation/conversation_model.go | 14 + pkg/common/db/relation/friend_model.go | 14 + .../db/relation/friend_request_model.go | 14 + pkg/common/db/relation/group_member_model.go | 14 + pkg/common/db/relation/group_model.go | 14 + pkg/common/db/relation/group_request_model.go | 14 + pkg/common/db/relation/meta_db.go | 14 + pkg/common/db/relation/mysql_init.go | 14 + pkg/common/db/relation/object_hash_model.go | 14 + pkg/common/db/relation/object_info_model.go | 14 + pkg/common/db/relation/object_put_model.go | 14 + pkg/common/db/relation/user_model.go | 14 + pkg/common/db/table/relation/black.go | 14 + pkg/common/db/table/relation/chatlog.go | 14 + pkg/common/db/table/relation/conversation.go | 14 + pkg/common/db/table/relation/friend.go | 14 + .../db/table/relation/friend_request.go | 14 + pkg/common/db/table/relation/group.go | 14 + pkg/common/db/table/relation/group_member.go | 14 + pkg/common/db/table/relation/group_request.go | 14 + pkg/common/db/table/relation/object_hash.go | 14 + pkg/common/db/table/relation/object_info.go | 14 + pkg/common/db/table/relation/object_put.go | 14 + pkg/common/db/table/relation/user.go | 14 + pkg/common/db/table/relation/utils.go | 14 + pkg/common/db/table/unrelation/common.go | 14 + .../db/table/unrelation/extend_msg_set.go | 14 + pkg/common/db/table/unrelation/msg.go | 14 + pkg/common/db/table/unrelation/super_group.go | 14 + pkg/common/db/tx/gorm.go | 14 + pkg/common/db/tx/mongo.go | 14 + pkg/common/db/tx/tx.go | 14 + pkg/common/db/unrelation/extend_msg.go | 14 + pkg/common/db/unrelation/mongo.go | 14 + pkg/common/db/unrelation/msg.go | 14 + pkg/common/db/unrelation/super_group.go | 14 + pkg/common/kafka/consumer.go | 14 + pkg/common/kafka/producer.go | 14 + pkg/common/log/color.go | 14 + pkg/common/log/logger.go | 14 + pkg/common/log/sql_logger.go | 14 + pkg/common/log/zap.go | 14 + pkg/common/log/zk_logger.go | 14 + pkg/common/mcontext/ctx.go | 14 + pkg/common/mw/check.go | 14 + pkg/common/mw/check_test.go | 14 + pkg/common/mw/gin.go | 14 + pkg/common/mw/intercept_chain.go | 14 + pkg/common/mw/rpc_client_interceptor.go | 14 + pkg/common/mw/rpc_server_interceptor.go | 14 + pkg/common/mw/specialerror/error.go | 14 + pkg/common/network/ip.go | 14 + pkg/common/prome/gather.go | 14 + pkg/common/prome/prometheus.go | 14 + pkg/common/tokenverify/jwt_token.go | 14 + pkg/common/tokenverify/jwt_token_test.go | 14 + pkg/discoveryregistry/discovery_register.go | 14 + pkg/discoveryregistry/zookeeper/conf.go | 14 + pkg/discoveryregistry/zookeeper/discover.go | 14 + pkg/discoveryregistry/zookeeper/register.go | 14 + pkg/discoveryregistry/zookeeper/resolver.go | 14 + pkg/discoveryregistry/zookeeper/zk.go | 14 + pkg/errs/code.go | 14 + pkg/errs/coderr.go | 14 + pkg/errs/predefine.go | 14 + pkg/errs/relation.go | 14 + pkg/proto/auth/auth.go | 14 + pkg/proto/auth/auth.proto | 14 + pkg/proto/conversation/conversation.go | 14 + pkg/proto/conversation/conversation.proto | 14 + pkg/proto/errinfo/errinfo.proto | 14 + pkg/proto/friend/friend.go | 14 + pkg/proto/friend/friend.proto | 14 + pkg/proto/gen.sh | 14 + pkg/proto/group/group.go | 14 + pkg/proto/group/group.proto | 14 + pkg/proto/msg/msg.go | 14 + pkg/proto/msg/msg.proto | 14 + pkg/proto/msggateway/msggateway.go | 14 + pkg/proto/msggateway/msggateway.proto | 14 + pkg/proto/push/push.go | 14 + pkg/proto/push/push.proto | 14 + pkg/proto/sdkws/sdkws.go | 14 + pkg/proto/sdkws/sdkws.proto | 14 + pkg/proto/statistics/statistics.proto | 14 + pkg/proto/third/third.go | 14 + pkg/proto/third/third.proto | 14 + pkg/proto/user/user.go | 14 + pkg/proto/user/user.proto | 14 + pkg/proto/wrapperspb/wrapperspb.go | 14 + pkg/proto/wrapperspb/wrapperspb.proto | 14 + pkg/rpcclient/auth.go | 14 + pkg/rpcclient/conversation.go | 14 + pkg/rpcclient/friend.go | 14 + pkg/rpcclient/group.go | 14 + pkg/rpcclient/msg.go | 14 + pkg/rpcclient/notification/common.go | 14 + pkg/rpcclient/notification/conevrsation.go | 14 + pkg/rpcclient/notification/extend_msg.go | 14 + pkg/rpcclient/notification/friend.go | 14 + pkg/rpcclient/notification/group.go | 14 + pkg/rpcclient/push.go | 14 + pkg/rpcclient/third.go | 14 + pkg/rpcclient/user.go | 14 + pkg/startrpc/start.go | 14 + pkg/statistics/statistics.go | 14 + pkg/utils/base64.go | 14 + pkg/utils/callback.go | 14 + pkg/utils/encryption.go | 14 + pkg/utils/file.go | 14 + pkg/utils/get_server_ip.go | 14 + pkg/utils/id.go | 14 + pkg/utils/id_test.go | 14 + pkg/utils/image.go | 14 + pkg/utils/image_test.go | 14 + pkg/utils/map.go | 14 + pkg/utils/md5_test.go | 14 + pkg/utils/options.go | 14 + pkg/utils/page.go | 14 + pkg/utils/platform_number_id_to_name_test.go | 14 + pkg/utils/retry/retry.go | 14 + pkg/utils/retry/stratey.go | 14 + pkg/utils/splitter/tools.go | 14 + pkg/utils/utils.go | 14 + pkg/utils/utils_v2.go | 14 + pkg/utils/utils_v2_test.go | 14 + scripts/batch_build_all_service.sh | 14 + scripts/batch_start_all.sh | 14 + scripts/build_all_service.sh | 14 + scripts/build_images.sh | 14 + scripts/build_push_k8s_images.sh | 14 + scripts/check_all.sh | 14 + scripts/coverage.sh | 14 + scripts/docker_check_service.sh | 14 + scripts/docker_start_all.sh | 14 + scripts/ensure_tag.sh | 23 ++ scripts/enterprise/check_all.sh | 14 + scripts/enterprise/function.sh | 14 + scripts/env_check.sh | 14 + scripts/function.sh | 14 + scripts/githooks/pre-commit | 1 - scripts/init_pwd.sh | 14 + scripts/lib/color.sh | 18 +- scripts/lib/golang.sh | 152 ++++---- scripts/lib/init.sh | 30 +- scripts/lib/logging.sh | 62 +-- scripts/lib/release.sh | 352 +++++++++--------- scripts/lib/util.sh | 204 +++++----- scripts/lib/version.sh | 94 ++--- scripts/make-rules/gen.mk | 4 +- scripts/make-rules/tools.mk | 2 +- scripts/mongo-init.sh | 14 + scripts/msg_gateway_start.sh | 14 + scripts/msg_transfer_start.sh | 14 + scripts/push_start.sh | 14 + scripts/release.sh | 42 ++- scripts/sdk_svr_start.sh | 14 + scripts/start_all.sh | 14 + scripts/start_cron.sh | 14 + scripts/start_rpc_service.sh | 14 + scripts/stop_all.sh | 14 + 341 files changed, 5138 insertions(+), 440 deletions(-) create mode 100644 scripts/ensure_tag.sh diff --git a/.docker-compose_cfg/grafana.ini b/.docker-compose_cfg/grafana.ini index b9380d7f1..8c1d9dd11 100644 --- a/.docker-compose_cfg/grafana.ini +++ b/.docker-compose_cfg/grafana.ini @@ -633,7 +633,7 @@ active_sync_enabled = true #################################### AWS ########################### [aws] # Enter a comma-separated list of allowed AWS authentication providers. -# Options are: default (AWS SDK Default), keys (Access && secret key), credentials (Credentials field), ec2_iam_role (EC2 IAM Role) +# Options are: default (AWS SDK Default), keys (Access && secret key), credentials (Credentials field), ec2_iam_role (EC2 OpenIM Role) allowed_auth_providers = default,keys,credentials # Allow AWS users to assume a role using temporary security credentials. diff --git a/cmd/api/deploy.Dockerfile b/cmd/api/deploy.Dockerfile index ad397ca23..a236c02f0 100644 --- a/cmd/api/deploy.Dockerfile +++ b/cmd/api/deploy.Dockerfile @@ -1,3 +1,17 @@ +# Copyright © 2023 OpenIM. 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. + FROM ubuntu WORKDIR /Open-IM-Server/bin diff --git a/cmd/api/main.go b/cmd/api/main.go index fb613b4da..aac83a805 100644 --- a/cmd/api/main.go +++ b/cmd/api/main.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 ( diff --git a/cmd/cmdutils/main.go b/cmd/cmdutils/main.go index 8c68fca6d..64079c7e1 100644 --- a/cmd/cmdutils/main.go +++ b/cmd/cmdutils/main.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 ( diff --git a/cmd/crontask/deploy.Dockerfile b/cmd/crontask/deploy.Dockerfile index 80ba5abf0..e80006def 100644 --- a/cmd/crontask/deploy.Dockerfile +++ b/cmd/crontask/deploy.Dockerfile @@ -1,3 +1,17 @@ +# Copyright © 2023 OpenIM. 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. + FROM ubuntu WORKDIR /Open-IM-Server/bin diff --git a/cmd/crontask/main.go b/cmd/crontask/main.go index 21a1cdff1..73deb8c66 100644 --- a/cmd/crontask/main.go +++ b/cmd/crontask/main.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 ( diff --git a/cmd/msggateway/deploy.Dockerfile b/cmd/msggateway/deploy.Dockerfile index bacb37b74..7310fe0dc 100644 --- a/cmd/msggateway/deploy.Dockerfile +++ b/cmd/msggateway/deploy.Dockerfile @@ -1,3 +1,17 @@ +# Copyright © 2023 OpenIM. 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. + FROM ubuntu WORKDIR /Open-IM-Server/bin diff --git a/cmd/msggateway/main.go b/cmd/msggateway/main.go index 695e45e1c..2782e4fd3 100644 --- a/cmd/msggateway/main.go +++ b/cmd/msggateway/main.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 ( diff --git a/cmd/msgtransfer/deploy.Dockerfile b/cmd/msgtransfer/deploy.Dockerfile index 4e48f8e3d..0c9485694 100644 --- a/cmd/msgtransfer/deploy.Dockerfile +++ b/cmd/msgtransfer/deploy.Dockerfile @@ -1,3 +1,17 @@ +# Copyright © 2023 OpenIM. 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. + FROM ubuntu WORKDIR /Open-IM-Server/bin diff --git a/cmd/msgtransfer/main.go b/cmd/msgtransfer/main.go index 7f8d1ce80..aef347793 100644 --- a/cmd/msgtransfer/main.go +++ b/cmd/msgtransfer/main.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 ( diff --git a/cmd/push/deploy.Dockerfile b/cmd/push/deploy.Dockerfile index f474b9ab2..79b8cb4f1 100644 --- a/cmd/push/deploy.Dockerfile +++ b/cmd/push/deploy.Dockerfile @@ -1,3 +1,17 @@ +# Copyright © 2023 OpenIM. 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. + FROM ubuntu WORKDIR /Open-IM-Server/bin diff --git a/cmd/push/main.go b/cmd/push/main.go index 05d8e70b4..03db8ae03 100644 --- a/cmd/push/main.go +++ b/cmd/push/main.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 ( diff --git a/cmd/rpc/auth/deploy.Dockerfile b/cmd/rpc/auth/deploy.Dockerfile index 700e85d4f..a7b69cc0a 100644 --- a/cmd/rpc/auth/deploy.Dockerfile +++ b/cmd/rpc/auth/deploy.Dockerfile @@ -1,3 +1,17 @@ +# Copyright © 2023 OpenIM. 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. + FROM ubuntu WORKDIR /Open-IM-Server/bin diff --git a/cmd/rpc/auth/main.go b/cmd/rpc/auth/main.go index 4d6986f84..524804988 100644 --- a/cmd/rpc/auth/main.go +++ b/cmd/rpc/auth/main.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 ( diff --git a/cmd/rpc/conversation/deploy.Dockerfile b/cmd/rpc/conversation/deploy.Dockerfile index 6b3a8ad40..4e7591499 100644 --- a/cmd/rpc/conversation/deploy.Dockerfile +++ b/cmd/rpc/conversation/deploy.Dockerfile @@ -1,3 +1,17 @@ +# Copyright © 2023 OpenIM. 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. + FROM ubuntu WORKDIR /Open-IM-Server/bin diff --git a/cmd/rpc/conversation/main.go b/cmd/rpc/conversation/main.go index 9f227fe17..fec8226f8 100644 --- a/cmd/rpc/conversation/main.go +++ b/cmd/rpc/conversation/main.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 ( diff --git a/cmd/rpc/friend/deploy.Dockerfile b/cmd/rpc/friend/deploy.Dockerfile index a57f9ccdc..d159ee0dd 100644 --- a/cmd/rpc/friend/deploy.Dockerfile +++ b/cmd/rpc/friend/deploy.Dockerfile @@ -1,3 +1,17 @@ +# Copyright © 2023 OpenIM. 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. + FROM ubuntu WORKDIR /Open-IM-Server/bin diff --git a/cmd/rpc/friend/main.go b/cmd/rpc/friend/main.go index 0838eaf5b..fbd44038e 100644 --- a/cmd/rpc/friend/main.go +++ b/cmd/rpc/friend/main.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 ( diff --git a/cmd/rpc/group/deploy.Dockerfile b/cmd/rpc/group/deploy.Dockerfile index 1d083c927..e676708d5 100644 --- a/cmd/rpc/group/deploy.Dockerfile +++ b/cmd/rpc/group/deploy.Dockerfile @@ -1,3 +1,17 @@ +# Copyright © 2023 OpenIM. 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. + FROM ubuntu WORKDIR /Open-IM-Server/bin diff --git a/cmd/rpc/group/main.go b/cmd/rpc/group/main.go index b73dd73c9..06baac155 100644 --- a/cmd/rpc/group/main.go +++ b/cmd/rpc/group/main.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 ( diff --git a/cmd/rpc/msg/deploy.Dockerfile b/cmd/rpc/msg/deploy.Dockerfile index 9b5f4194d..8e6307ccb 100644 --- a/cmd/rpc/msg/deploy.Dockerfile +++ b/cmd/rpc/msg/deploy.Dockerfile @@ -1,3 +1,17 @@ +# Copyright © 2023 OpenIM. 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. + FROM ubuntu WORKDIR /Open-IM-Server/bin diff --git a/cmd/rpc/msg/main.go b/cmd/rpc/msg/main.go index 7b9756680..356081d33 100644 --- a/cmd/rpc/msg/main.go +++ b/cmd/rpc/msg/main.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 ( diff --git a/cmd/rpc/third/deploy.Dockerfile b/cmd/rpc/third/deploy.Dockerfile index 3c5b23120..462798b00 100644 --- a/cmd/rpc/third/deploy.Dockerfile +++ b/cmd/rpc/third/deploy.Dockerfile @@ -1,3 +1,17 @@ +# Copyright © 2023 OpenIM. 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. + FROM ubuntu WORKDIR /Open-IM-Server/bin diff --git a/cmd/rpc/third/main.go b/cmd/rpc/third/main.go index 7705852d7..c070e6811 100644 --- a/cmd/rpc/third/main.go +++ b/cmd/rpc/third/main.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 ( diff --git a/cmd/rpc/user/deploy.Dockerfile b/cmd/rpc/user/deploy.Dockerfile index c0f0956e8..047698788 100644 --- a/cmd/rpc/user/deploy.Dockerfile +++ b/cmd/rpc/user/deploy.Dockerfile @@ -1,3 +1,17 @@ +# Copyright © 2023 OpenIM. 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. + FROM ubuntu WORKDIR /Open-IM-Server/bin diff --git a/cmd/rpc/user/main.go b/cmd/rpc/user/main.go index dfebb307d..6d6d9008d 100644 --- a/cmd/rpc/user/main.go +++ b/cmd/rpc/user/main.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 ( diff --git a/config/config.yaml b/config/config.yaml index 90e8a6913..def91d2b5 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -1,3 +1,17 @@ +# Copyright © 2023 OpenIM. 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. + #OpenIM config diff --git a/config/notification.yaml b/config/notification.yaml index 4b0f3a180..c25c58ee3 100644 --- a/config/notification.yaml +++ b/config/notification.yaml @@ -1,3 +1,17 @@ +# Copyright © 2023 OpenIM. 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. + groupCreated: isSendMsg: true #是否发送消息,false不发消息为无声的触发同步。true发消息需要触发会话,rpc notification直接发两次,一次消息一次通知, options字段isNotification是否为通知 reliabilityLevel: 1 # 1为online才发送 2为必达 diff --git a/internal/api/auth.go b/internal/api/auth.go index a9cf17707..531b39622 100644 --- a/internal/api/auth.go +++ b/internal/api/auth.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 ( diff --git a/internal/api/conversation.go b/internal/api/conversation.go index 767cc8517..7f1732fec 100644 --- a/internal/api/conversation.go +++ b/internal/api/conversation.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 ( diff --git a/internal/api/custom_validator.go b/internal/api/custom_validator.go index b434c792e..42e50647f 100644 --- a/internal/api/custom_validator.go +++ b/internal/api/custom_validator.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 ( diff --git a/internal/api/friend.go b/internal/api/friend.go index 8fe9033d5..60a08a8e7 100644 --- a/internal/api/friend.go +++ b/internal/api/friend.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 ( diff --git a/internal/api/group.go b/internal/api/group.go index c165f8aab..432645caa 100644 --- a/internal/api/group.go +++ b/internal/api/group.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 ( diff --git a/internal/api/msg.go b/internal/api/msg.go index 6f0cf7033..a4da4ea7e 100644 --- a/internal/api/msg.go +++ b/internal/api/msg.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 ( diff --git a/internal/api/route.go b/internal/api/route.go index 8a786dc6f..b014f66ab 100644 --- a/internal/api/route.go +++ b/internal/api/route.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 ( diff --git a/internal/api/statistics.go b/internal/api/statistics.go index 4a85dd5ef..5b5de01d9 100644 --- a/internal/api/statistics.go +++ b/internal/api/statistics.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 ( diff --git a/internal/api/third.go b/internal/api/third.go index 559869f1e..79be58a46 100644 --- a/internal/api/third.go +++ b/internal/api/third.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 ( diff --git a/internal/api/user.go b/internal/api/user.go index d3b7bae0e..e99e17b00 100644 --- a/internal/api/user.go +++ b/internal/api/user.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 ( diff --git a/internal/msggateway/callback.go b/internal/msggateway/callback.go index 79bcdac97..d705e25f0 100644 --- a/internal/msggateway/callback.go +++ b/internal/msggateway/callback.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 msggateway import ( diff --git a/internal/msggateway/client.go b/internal/msggateway/client.go index ef92438e6..439a98fee 100644 --- a/internal/msggateway/client.go +++ b/internal/msggateway/client.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 msggateway import ( diff --git a/internal/msggateway/compressor.go b/internal/msggateway/compressor.go index a37c74ccd..97a9b1eff 100644 --- a/internal/msggateway/compressor.go +++ b/internal/msggateway/compressor.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 msggateway import ( diff --git a/internal/msggateway/constant.go b/internal/msggateway/constant.go index 58ee6e940..043c9d688 100644 --- a/internal/msggateway/constant.go +++ b/internal/msggateway/constant.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 msggateway import "time" diff --git a/internal/msggateway/context.go b/internal/msggateway/context.go index 61f4d7970..e5ccc00f4 100644 --- a/internal/msggateway/context.go +++ b/internal/msggateway/context.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 msggateway import ( diff --git a/internal/msggateway/encoder.go b/internal/msggateway/encoder.go index 6915766c6..a34a66e66 100644 --- a/internal/msggateway/encoder.go +++ b/internal/msggateway/encoder.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 msggateway import ( diff --git a/internal/msggateway/http_error.go b/internal/msggateway/http_error.go index fd00276fb..03121aba3 100644 --- a/internal/msggateway/http_error.go +++ b/internal/msggateway/http_error.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 msggateway import "github.com/OpenIMSDK/Open-IM-Server/pkg/apiresp" diff --git a/internal/msggateway/hub_server.go b/internal/msggateway/hub_server.go index 6916f5309..a7d571e20 100644 --- a/internal/msggateway/hub_server.go +++ b/internal/msggateway/hub_server.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 msggateway import ( diff --git a/internal/msggateway/init.go b/internal/msggateway/init.go index c21ac02ce..3ec2a56ac 100644 --- a/internal/msggateway/init.go +++ b/internal/msggateway/init.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 msggateway import ( diff --git a/internal/msggateway/long_conn.go b/internal/msggateway/long_conn.go index 911e9a4a1..309ec2d8b 100644 --- a/internal/msggateway/long_conn.go +++ b/internal/msggateway/long_conn.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 msggateway import ( diff --git a/internal/msggateway/message_handler.go b/internal/msggateway/message_handler.go index 73b22b83d..874101a05 100644 --- a/internal/msggateway/message_handler.go +++ b/internal/msggateway/message_handler.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 msggateway import ( diff --git a/internal/msggateway/n_ws_server.go b/internal/msggateway/n_ws_server.go index c1ec5d076..53469fca8 100644 --- a/internal/msggateway/n_ws_server.go +++ b/internal/msggateway/n_ws_server.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 msggateway import ( diff --git a/internal/msggateway/options.go b/internal/msggateway/options.go index a54ffe880..cee415f99 100644 --- a/internal/msggateway/options.go +++ b/internal/msggateway/options.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 msggateway import "time" diff --git a/internal/msggateway/user_map.go b/internal/msggateway/user_map.go index 46bdb16a4..9e6757731 100644 --- a/internal/msggateway/user_map.go +++ b/internal/msggateway/user_map.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 msggateway import ( diff --git a/internal/msgtransfer/init.go b/internal/msgtransfer/init.go index 5b82a7d30..946048f0c 100644 --- a/internal/msgtransfer/init.go +++ b/internal/msgtransfer/init.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 msgtransfer import ( diff --git a/internal/msgtransfer/modify_msg_handler.go b/internal/msgtransfer/modify_msg_handler.go index e4130addb..38a2f5fce 100644 --- a/internal/msgtransfer/modify_msg_handler.go +++ b/internal/msgtransfer/modify_msg_handler.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 msgtransfer import ( diff --git a/internal/msgtransfer/online_history_msg_handler.go b/internal/msgtransfer/online_history_msg_handler.go index ee7c3bd95..574288de0 100644 --- a/internal/msgtransfer/online_history_msg_handler.go +++ b/internal/msgtransfer/online_history_msg_handler.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 msgtransfer import ( diff --git a/internal/msgtransfer/online_msg_to_mongo_handler.go b/internal/msgtransfer/online_msg_to_mongo_handler.go index 7a4799fac..a7bfa3c8f 100644 --- a/internal/msgtransfer/online_msg_to_mongo_handler.go +++ b/internal/msgtransfer/online_msg_to_mongo_handler.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 msgtransfer import ( diff --git a/internal/push/callback.go b/internal/push/callback.go index 854d27fc2..a3387905e 100644 --- a/internal/push/callback.go +++ b/internal/push/callback.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 push import ( diff --git a/internal/push/consumer_init.go b/internal/push/consumer_init.go index a76de754f..3c07ab284 100644 --- a/internal/push/consumer_init.go +++ b/internal/push/consumer_init.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 push import ( diff --git a/internal/push/offlinepush/fcm/push.go b/internal/push/offlinepush/fcm/push.go index 63e945d98..8b880ae1f 100644 --- a/internal/push/offlinepush/fcm/push.go +++ b/internal/push/offlinepush/fcm/push.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 fcm import ( diff --git a/internal/push/offlinepush/fcm/push_test.go b/internal/push/offlinepush/fcm/push_test.go index 5cef4ef2b..856b75e0b 100644 --- a/internal/push/offlinepush/fcm/push_test.go +++ b/internal/push/offlinepush/fcm/push_test.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 fcm import ( diff --git a/internal/push/offlinepush/getui/body.go b/internal/push/offlinepush/getui/body.go index b7a4bc082..bd0f7b07f 100644 --- a/internal/push/offlinepush/getui/body.go +++ b/internal/push/offlinepush/getui/body.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 getui import ( diff --git a/internal/push/offlinepush/getui/push.go b/internal/push/offlinepush/getui/push.go index 17278a4ff..2681aede6 100644 --- a/internal/push/offlinepush/getui/push.go +++ b/internal/push/offlinepush/getui/push.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 getui import ( diff --git a/internal/push/offlinepush/jpush/body/audience.go b/internal/push/offlinepush/jpush/body/audience.go index 124c1072a..f29930886 100644 --- a/internal/push/offlinepush/jpush/body/audience.go +++ b/internal/push/offlinepush/jpush/body/audience.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 body const ( diff --git a/internal/push/offlinepush/jpush/body/message.go b/internal/push/offlinepush/jpush/body/message.go index 955a0fffb..670cd4c78 100644 --- a/internal/push/offlinepush/jpush/body/message.go +++ b/internal/push/offlinepush/jpush/body/message.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 body type Message struct { diff --git a/internal/push/offlinepush/jpush/body/notification.go b/internal/push/offlinepush/jpush/body/notification.go index 004730906..cec725784 100644 --- a/internal/push/offlinepush/jpush/body/notification.go +++ b/internal/push/offlinepush/jpush/body/notification.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 body import ( diff --git a/internal/push/offlinepush/jpush/body/options.go b/internal/push/offlinepush/jpush/body/options.go index 323637414..2edf80cf0 100644 --- a/internal/push/offlinepush/jpush/body/options.go +++ b/internal/push/offlinepush/jpush/body/options.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 body type Options struct { diff --git a/internal/push/offlinepush/jpush/body/platform.go b/internal/push/offlinepush/jpush/body/platform.go index 68264fea0..eae782c63 100644 --- a/internal/push/offlinepush/jpush/body/platform.go +++ b/internal/push/offlinepush/jpush/body/platform.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 body import ( diff --git a/internal/push/offlinepush/jpush/body/pushobj.go b/internal/push/offlinepush/jpush/body/pushobj.go index e91faf25a..950f93777 100644 --- a/internal/push/offlinepush/jpush/body/pushobj.go +++ b/internal/push/offlinepush/jpush/body/pushobj.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 body type PushObj struct { diff --git a/internal/push/offlinepush/jpush/push.go b/internal/push/offlinepush/jpush/push.go index e22e97df4..64933db50 100644 --- a/internal/push/offlinepush/jpush/push.go +++ b/internal/push/offlinepush/jpush/push.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 jpush import ( diff --git a/internal/push/offlinepush/offlinepush_interface.go b/internal/push/offlinepush/offlinepush_interface.go index 0060b3e30..44dfce2b8 100644 --- a/internal/push/offlinepush/offlinepush_interface.go +++ b/internal/push/offlinepush/offlinepush_interface.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 offlinepush import ( diff --git a/internal/push/push_handler.go b/internal/push/push_handler.go index 2d0694088..86db1c762 100644 --- a/internal/push/push_handler.go +++ b/internal/push/push_handler.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 push import ( diff --git a/internal/push/push_rpc_server.go b/internal/push/push_rpc_server.go index 08edc738e..1b84a1b82 100644 --- a/internal/push/push_rpc_server.go +++ b/internal/push/push_rpc_server.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 push import ( diff --git a/internal/push/push_to_client.go b/internal/push/push_to_client.go index 3cc91d20f..7cc5b1ea4 100644 --- a/internal/push/push_to_client.go +++ b/internal/push/push_to_client.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 push import ( diff --git a/internal/rpc/auth/auth.go b/internal/rpc/auth/auth.go index 2e0b7fe53..9376a5ccc 100644 --- a/internal/rpc/auth/auth.go +++ b/internal/rpc/auth/auth.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 auth import ( diff --git a/internal/rpc/conversation/conversaion.go b/internal/rpc/conversation/conversaion.go index 11859136f..640c09991 100644 --- a/internal/rpc/conversation/conversaion.go +++ b/internal/rpc/conversation/conversaion.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 conversation import ( diff --git a/internal/rpc/friend/black.go b/internal/rpc/friend/black.go index 784e32d20..23aa8efa3 100644 --- a/internal/rpc/friend/black.go +++ b/internal/rpc/friend/black.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 friend import ( diff --git a/internal/rpc/friend/callback.go b/internal/rpc/friend/callback.go index c36e743c5..478988f11 100644 --- a/internal/rpc/friend/callback.go +++ b/internal/rpc/friend/callback.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 friend import ( diff --git a/internal/rpc/friend/friend.go b/internal/rpc/friend/friend.go index da99fd34c..c07b1423c 100644 --- a/internal/rpc/friend/friend.go +++ b/internal/rpc/friend/friend.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 friend import ( diff --git a/internal/rpc/group/cache.go b/internal/rpc/group/cache.go index 0a13a45e5..3c71eb2a9 100644 --- a/internal/rpc/group/cache.go +++ b/internal/rpc/group/cache.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 group import ( diff --git a/internal/rpc/group/callback.go b/internal/rpc/group/callback.go index f61413f30..acab0ea0d 100644 --- a/internal/rpc/group/callback.go +++ b/internal/rpc/group/callback.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 group import ( diff --git a/internal/rpc/group/convert.go b/internal/rpc/group/convert.go index 48e70357b..c0a03aa4e 100644 --- a/internal/rpc/group/convert.go +++ b/internal/rpc/group/convert.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 group import ( diff --git a/internal/rpc/group/db_map.go b/internal/rpc/group/db_map.go index 7eb9ff650..2ab1a75ea 100644 --- a/internal/rpc/group/db_map.go +++ b/internal/rpc/group/db_map.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 group import ( diff --git a/internal/rpc/group/fill.go b/internal/rpc/group/fill.go index 64092eeab..47b536301 100644 --- a/internal/rpc/group/fill.go +++ b/internal/rpc/group/fill.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 group import ( diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index 56bc6cfad..8daf45454 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 group import ( diff --git a/internal/rpc/group/super_group.go b/internal/rpc/group/super_group.go index ab4cbd5ff..2e174f956 100644 --- a/internal/rpc/group/super_group.go +++ b/internal/rpc/group/super_group.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 group import ( diff --git a/internal/rpc/msg/as_read.go b/internal/rpc/msg/as_read.go index c4707c489..91915c647 100644 --- a/internal/rpc/msg/as_read.go +++ b/internal/rpc/msg/as_read.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 msg import ( diff --git a/internal/rpc/msg/callback.go b/internal/rpc/msg/callback.go index aac96f75c..2d4988adf 100644 --- a/internal/rpc/msg/callback.go +++ b/internal/rpc/msg/callback.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 msg import ( diff --git a/internal/rpc/msg/delete.go b/internal/rpc/msg/delete.go index 97efff41b..d2ead459e 100644 --- a/internal/rpc/msg/delete.go +++ b/internal/rpc/msg/delete.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 msg import ( diff --git a/internal/rpc/msg/extend_msg.go b/internal/rpc/msg/extend_msg.go index 7ae56c71e..6f82d980f 100644 --- a/internal/rpc/msg/extend_msg.go +++ b/internal/rpc/msg/extend_msg.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 msg import ( diff --git a/internal/rpc/msg/extend_msg_callback.go b/internal/rpc/msg/extend_msg_callback.go index 09fa40735..d510afd0c 100644 --- a/internal/rpc/msg/extend_msg_callback.go +++ b/internal/rpc/msg/extend_msg_callback.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 msg import ( diff --git a/internal/rpc/msg/lock.go b/internal/rpc/msg/lock.go index 64744263f..50224c6a3 100644 --- a/internal/rpc/msg/lock.go +++ b/internal/rpc/msg/lock.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 msg import ( diff --git a/internal/rpc/msg/message_interceptor.go b/internal/rpc/msg/message_interceptor.go index 702cdc764..49a330d5e 100644 --- a/internal/rpc/msg/message_interceptor.go +++ b/internal/rpc/msg/message_interceptor.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 msg import ( diff --git a/internal/rpc/msg/msg_status.go b/internal/rpc/msg/msg_status.go index b867e3065..f9ab0d09c 100644 --- a/internal/rpc/msg/msg_status.go +++ b/internal/rpc/msg/msg_status.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 msg import ( diff --git a/internal/rpc/msg/revoke.go b/internal/rpc/msg/revoke.go index 2ea89ee87..c4b64aa46 100644 --- a/internal/rpc/msg/revoke.go +++ b/internal/rpc/msg/revoke.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 msg import ( diff --git a/internal/rpc/msg/send.go b/internal/rpc/msg/send.go index c7450fd00..2c27b869d 100644 --- a/internal/rpc/msg/send.go +++ b/internal/rpc/msg/send.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 msg import ( diff --git a/internal/rpc/msg/seq.go b/internal/rpc/msg/seq.go index 892d39bfe..ac771d3ee 100644 --- a/internal/rpc/msg/seq.go +++ b/internal/rpc/msg/seq.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 msg import ( diff --git a/internal/rpc/msg/server.go b/internal/rpc/msg/server.go index a077adb83..4702eb5f9 100644 --- a/internal/rpc/msg/server.go +++ b/internal/rpc/msg/server.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 msg import ( diff --git a/internal/rpc/msg/sync_msg.go b/internal/rpc/msg/sync_msg.go index b9cfed97c..7ac30ff1a 100644 --- a/internal/rpc/msg/sync_msg.go +++ b/internal/rpc/msg/sync_msg.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 msg import ( diff --git a/internal/rpc/msg/utils.go b/internal/rpc/msg/utils.go index 199f1535f..10eccbcff 100644 --- a/internal/rpc/msg/utils.go +++ b/internal/rpc/msg/utils.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 msg import ( diff --git a/internal/rpc/msg/verify.go b/internal/rpc/msg/verify.go index dd5b3436b..be2945182 100644 --- a/internal/rpc/msg/verify.go +++ b/internal/rpc/msg/verify.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 msg import ( diff --git a/internal/rpc/statistics/statistics.go b/internal/rpc/statistics/statistics.go index 12c0dbc25..2f81301a1 100644 --- a/internal/rpc/statistics/statistics.go +++ b/internal/rpc/statistics/statistics.go @@ -1 +1,15 @@ +// Copyright © 2023 OpenIM. 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 statistics diff --git a/internal/rpc/third/s3.go b/internal/rpc/third/s3.go index e0a3a99da..4ff9a3ce8 100644 --- a/internal/rpc/third/s3.go +++ b/internal/rpc/third/s3.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 third import ( diff --git a/internal/rpc/third/third.go b/internal/rpc/third/third.go index 1ac63c245..ebf2c60d1 100644 --- a/internal/rpc/third/third.go +++ b/internal/rpc/third/third.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 third import ( diff --git a/internal/rpc/user/statistics.go b/internal/rpc/user/statistics.go index 7cbbcb82d..7da40bb1e 100644 --- a/internal/rpc/user/statistics.go +++ b/internal/rpc/user/statistics.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 user import ( diff --git a/internal/rpc/user/user.go b/internal/rpc/user/user.go index 5004dc1f6..d2368ceb3 100644 --- a/internal/rpc/user/user.go +++ b/internal/rpc/user/user.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 user import ( diff --git a/internal/tools/cron_task.go b/internal/tools/cron_task.go index bac433fc5..365c6cbf4 100644 --- a/internal/tools/cron_task.go +++ b/internal/tools/cron_task.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 tools import ( diff --git a/internal/tools/msg.go b/internal/tools/msg.go index 0c58791a0..8389352a8 100644 --- a/internal/tools/msg.go +++ b/internal/tools/msg.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 tools import ( diff --git a/internal/tools/msg_test.go b/internal/tools/msg_test.go index 241748f76..4b1ea0384 100644 --- a/internal/tools/msg_test.go +++ b/internal/tools/msg_test.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 tools import ( diff --git a/pkg/a2r/api2rpc.go b/pkg/a2r/api2rpc.go index 1a064176c..6a1651a3c 100644 --- a/pkg/a2r/api2rpc.go +++ b/pkg/a2r/api2rpc.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 a2r import ( diff --git a/pkg/apiresp/gin.go b/pkg/apiresp/gin.go index b2bfaf4f9..9d5637bfd 100644 --- a/pkg/apiresp/gin.go +++ b/pkg/apiresp/gin.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 apiresp import ( diff --git a/pkg/apiresp/http.go b/pkg/apiresp/http.go index f079fae6a..db1c847cf 100644 --- a/pkg/apiresp/http.go +++ b/pkg/apiresp/http.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 apiresp import ( diff --git a/pkg/apiresp/resp.go b/pkg/apiresp/resp.go index 29dc33996..a7bd271a3 100644 --- a/pkg/apiresp/resp.go +++ b/pkg/apiresp/resp.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 apiresp import ( diff --git a/pkg/apistruct/auth.go b/pkg/apistruct/auth.go index b760dcd08..119cbac77 100644 --- a/pkg/apistruct/auth.go +++ b/pkg/apistruct/auth.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 apistruct type UserRegisterReq struct { diff --git a/pkg/apistruct/aws.go b/pkg/apistruct/aws.go index 0ef2640c5..3518baea0 100644 --- a/pkg/apistruct/aws.go +++ b/pkg/apistruct/aws.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 apistruct type AwsStorageCredentialReq struct { diff --git a/pkg/apistruct/conversation.go b/pkg/apistruct/conversation.go index 1c6ba6e29..c58daa634 100644 --- a/pkg/apistruct/conversation.go +++ b/pkg/apistruct/conversation.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 apistruct type OptResult struct { diff --git a/pkg/apistruct/cos.go b/pkg/apistruct/cos.go index 2695b6bbf..bd2611553 100644 --- a/pkg/apistruct/cos.go +++ b/pkg/apistruct/cos.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 apistruct import sts "github.com/tencentyun/qcloud-cos-sts-sdk/go" diff --git a/pkg/apistruct/friend.go b/pkg/apistruct/friend.go index 14a7438ac..3b1ab919d 100644 --- a/pkg/apistruct/friend.go +++ b/pkg/apistruct/friend.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 apistruct //type ParamsCommFriend struct { diff --git a/pkg/apistruct/group.go b/pkg/apistruct/group.go index 32af09551..45be76cf9 100644 --- a/pkg/apistruct/group.go +++ b/pkg/apistruct/group.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 apistruct import ( diff --git a/pkg/apistruct/manage.go b/pkg/apistruct/manage.go index 832597fd0..455b2fe4c 100644 --- a/pkg/apistruct/manage.go +++ b/pkg/apistruct/manage.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 apistruct import ( diff --git a/pkg/apistruct/msg.go b/pkg/apistruct/msg.go index 5efa917d1..4b776cb48 100644 --- a/pkg/apistruct/msg.go +++ b/pkg/apistruct/msg.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 apistruct import ( diff --git a/pkg/apistruct/oss.go b/pkg/apistruct/oss.go index 55370d50c..4f1e6c00a 100644 --- a/pkg/apistruct/oss.go +++ b/pkg/apistruct/oss.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 apistruct type OSSCredentialReq struct { diff --git a/pkg/apistruct/pagination.go b/pkg/apistruct/pagination.go index 9b64ad8c1..02de39967 100644 --- a/pkg/apistruct/pagination.go +++ b/pkg/apistruct/pagination.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 apistruct type Pagination struct { diff --git a/pkg/apistruct/public.go b/pkg/apistruct/public.go index fc3d3e707..ff3a115ae 100644 --- a/pkg/apistruct/public.go +++ b/pkg/apistruct/public.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 apistruct type ApiUserInfo struct { diff --git a/pkg/apistruct/super_group.go b/pkg/apistruct/super_group.go index 6c8bf9515..92275eabf 100644 --- a/pkg/apistruct/super_group.go +++ b/pkg/apistruct/super_group.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 apistruct type GetJoinedSuperGroupListReq struct { diff --git a/pkg/apistruct/third.go b/pkg/apistruct/third.go index 80e9d4930..76ff89f62 100644 --- a/pkg/apistruct/third.go +++ b/pkg/apistruct/third.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 apistruct import "mime/multipart" diff --git a/pkg/callbackstruct/common.go b/pkg/callbackstruct/common.go index 11ff51deb..4a83bb09f 100644 --- a/pkg/callbackstruct/common.go +++ b/pkg/callbackstruct/common.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 callbackstruct import ( diff --git a/pkg/callbackstruct/friend.go b/pkg/callbackstruct/friend.go index ebb661a18..7e89824e2 100644 --- a/pkg/callbackstruct/friend.go +++ b/pkg/callbackstruct/friend.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 callbackstruct type CallbackBeforeAddFriendReq struct { diff --git a/pkg/callbackstruct/group.go b/pkg/callbackstruct/group.go index 1ae59e658..558ad4d23 100644 --- a/pkg/callbackstruct/group.go +++ b/pkg/callbackstruct/group.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 callbackstruct import ( diff --git a/pkg/callbackstruct/message.go b/pkg/callbackstruct/message.go index 965d91df2..677e70f27 100644 --- a/pkg/callbackstruct/message.go +++ b/pkg/callbackstruct/message.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 callbackstruct import ( diff --git a/pkg/callbackstruct/msg_gateway.go b/pkg/callbackstruct/msg_gateway.go index 48605e791..a70f724ce 100644 --- a/pkg/callbackstruct/msg_gateway.go +++ b/pkg/callbackstruct/msg_gateway.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 callbackstruct type CallbackUserOnlineReq struct { diff --git a/pkg/callbackstruct/push.go b/pkg/callbackstruct/push.go index a1a0f890c..cac37330a 100644 --- a/pkg/callbackstruct/push.go +++ b/pkg/callbackstruct/push.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 callbackstruct import common "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" diff --git a/pkg/checker/check.go b/pkg/checker/check.go index f5913682d..f3f3811a4 100644 --- a/pkg/checker/check.go +++ b/pkg/checker/check.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 checker type Checker interface { diff --git a/pkg/common/cmd/api.go b/pkg/common/cmd/api.go index 22534c39d..4cb5e34fc 100644 --- a/pkg/common/cmd/api.go +++ b/pkg/common/cmd/api.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 cmd import "github.com/spf13/cobra" diff --git a/pkg/common/cmd/cron_task.go b/pkg/common/cmd/cron_task.go index 7795e5e3d..c26cf2e4f 100644 --- a/pkg/common/cmd/cron_task.go +++ b/pkg/common/cmd/cron_task.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 cmd import "github.com/spf13/cobra" diff --git a/pkg/common/cmd/msg_gateway.go b/pkg/common/cmd/msg_gateway.go index deea1c106..f3547d649 100644 --- a/pkg/common/cmd/msg_gateway.go +++ b/pkg/common/cmd/msg_gateway.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 cmd import ( diff --git a/pkg/common/cmd/msg_transfer.go b/pkg/common/cmd/msg_transfer.go index d6d65a1dd..5c9c3d0cb 100644 --- a/pkg/common/cmd/msg_transfer.go +++ b/pkg/common/cmd/msg_transfer.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 cmd import ( diff --git a/pkg/common/cmd/msg_utils.go b/pkg/common/cmd/msg_utils.go index 00b3f7359..c4f202d2b 100644 --- a/pkg/common/cmd/msg_utils.go +++ b/pkg/common/cmd/msg_utils.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 cmd import ( diff --git a/pkg/common/cmd/root.go b/pkg/common/cmd/root.go index ee586e247..4a5744033 100644 --- a/pkg/common/cmd/root.go +++ b/pkg/common/cmd/root.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 cmd import ( diff --git a/pkg/common/cmd/rpc.go b/pkg/common/cmd/rpc.go index be44f7ce0..bfaef5305 100644 --- a/pkg/common/cmd/rpc.go +++ b/pkg/common/cmd/rpc.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 cmd import ( diff --git a/pkg/common/config/config.go b/pkg/common/config/config.go index 40161932b..eef803e12 100644 --- a/pkg/common/config/config.go +++ b/pkg/common/config/config.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 ( diff --git a/pkg/common/config/parse.go b/pkg/common/config/parse.go index ebd6c49fc..38f033ab4 100644 --- a/pkg/common/config/parse.go +++ b/pkg/common/config/parse.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 ( diff --git a/pkg/common/constant/constant.go b/pkg/common/constant/constant.go index 1d0a98558..55ef31acf 100644 --- a/pkg/common/constant/constant.go +++ b/pkg/common/constant/constant.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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/constant/limit.go b/pkg/common/constant/limit.go index 57e764eef..fd1551b34 100644 --- a/pkg/common/constant/limit.go +++ b/pkg/common/constant/limit.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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/constant/platform_id_to_name.go b/pkg/common/constant/platform_id_to_name.go index e8bb129eb..31b1fcdd9 100644 --- a/pkg/common/constant/platform_id_to_name.go +++ b/pkg/common/constant/platform_id_to_name.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 // fixme 1<--->IOS 2<--->Android 3<--->Windows diff --git a/pkg/common/convert/black.go b/pkg/common/convert/black.go index cadd822c8..684a40d0d 100644 --- a/pkg/common/convert/black.go +++ b/pkg/common/convert/black.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 convert import ( diff --git a/pkg/common/convert/conversation.go b/pkg/common/convert/conversation.go index 66d1d771c..f00cae58f 100644 --- a/pkg/common/convert/conversation.go +++ b/pkg/common/convert/conversation.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 convert import ( diff --git a/pkg/common/convert/friend.go b/pkg/common/convert/friend.go index b907f9ad0..018aee42f 100644 --- a/pkg/common/convert/friend.go +++ b/pkg/common/convert/friend.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 convert import ( diff --git a/pkg/common/convert/group.go b/pkg/common/convert/group.go index adec0e6f3..e8808d199 100644 --- a/pkg/common/convert/group.go +++ b/pkg/common/convert/group.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 convert import ( diff --git a/pkg/common/convert/msg.go b/pkg/common/convert/msg.go index c8b8a6625..59215bb86 100644 --- a/pkg/common/convert/msg.go +++ b/pkg/common/convert/msg.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 convert import ( diff --git a/pkg/common/convert/user.go b/pkg/common/convert/user.go index 625bfef7d..d8d4c488c 100644 --- a/pkg/common/convert/user.go +++ b/pkg/common/convert/user.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 convert import ( diff --git a/pkg/common/db/cache/black.go b/pkg/common/db/cache/black.go index ca2f2ed9a..d6b82ef33 100644 --- a/pkg/common/db/cache/black.go +++ b/pkg/common/db/cache/black.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 cache import ( diff --git a/pkg/common/db/cache/conversation.go b/pkg/common/db/cache/conversation.go index 1005ee325..c35f0c240 100644 --- a/pkg/common/db/cache/conversation.go +++ b/pkg/common/db/cache/conversation.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 cache import ( diff --git a/pkg/common/db/cache/extend_msg_set.go b/pkg/common/db/cache/extend_msg_set.go index a45bf87f8..d7750e66b 100644 --- a/pkg/common/db/cache/extend_msg_set.go +++ b/pkg/common/db/cache/extend_msg_set.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 cache import ( diff --git a/pkg/common/db/cache/friend.go b/pkg/common/db/cache/friend.go index c816f6d4f..4695987dd 100644 --- a/pkg/common/db/cache/friend.go +++ b/pkg/common/db/cache/friend.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 cache import ( diff --git a/pkg/common/db/cache/group.go b/pkg/common/db/cache/group.go index 11c733d2b..86adc2d0a 100644 --- a/pkg/common/db/cache/group.go +++ b/pkg/common/db/cache/group.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 cache import ( diff --git a/pkg/common/db/cache/init_redis.go b/pkg/common/db/cache/init_redis.go index e4b950ee1..72dfc8caf 100644 --- a/pkg/common/db/cache/init_redis.go +++ b/pkg/common/db/cache/init_redis.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 cache import ( diff --git a/pkg/common/db/cache/meta_cache.go b/pkg/common/db/cache/meta_cache.go index e12f8e93c..86a47f04b 100644 --- a/pkg/common/db/cache/meta_cache.go +++ b/pkg/common/db/cache/meta_cache.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 cache import ( diff --git a/pkg/common/db/cache/msg.go b/pkg/common/db/cache/msg.go index e01836118..5f57103b0 100644 --- a/pkg/common/db/cache/msg.go +++ b/pkg/common/db/cache/msg.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 cache import ( diff --git a/pkg/common/db/cache/user.go b/pkg/common/db/cache/user.go index c8e8b1cc5..455bc9ebe 100644 --- a/pkg/common/db/cache/user.go +++ b/pkg/common/db/cache/user.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 cache import ( diff --git a/pkg/common/db/controller/auth.go b/pkg/common/db/controller/auth.go index 46d2eb55a..454d9707f 100644 --- a/pkg/common/db/controller/auth.go +++ b/pkg/common/db/controller/auth.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 controller import ( diff --git a/pkg/common/db/controller/black.go b/pkg/common/db/controller/black.go index fad4d8acb..13b375787 100644 --- a/pkg/common/db/controller/black.go +++ b/pkg/common/db/controller/black.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 controller import ( diff --git a/pkg/common/db/controller/chatlog.go b/pkg/common/db/controller/chatlog.go index cb161699f..5385fdfec 100644 --- a/pkg/common/db/controller/chatlog.go +++ b/pkg/common/db/controller/chatlog.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 controller import ( diff --git a/pkg/common/db/controller/conversation.go b/pkg/common/db/controller/conversation.go index d5bec4376..8e7b7a350 100644 --- a/pkg/common/db/controller/conversation.go +++ b/pkg/common/db/controller/conversation.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 controller import ( diff --git a/pkg/common/db/controller/extend_msg.go b/pkg/common/db/controller/extend_msg.go index b9395db0e..73b6d9330 100644 --- a/pkg/common/db/controller/extend_msg.go +++ b/pkg/common/db/controller/extend_msg.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 controller import ( diff --git a/pkg/common/db/controller/friend.go b/pkg/common/db/controller/friend.go index 3a98bd8ec..116345219 100644 --- a/pkg/common/db/controller/friend.go +++ b/pkg/common/db/controller/friend.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 controller import ( diff --git a/pkg/common/db/controller/group.go b/pkg/common/db/controller/group.go index 58ee9394b..18b10aca5 100644 --- a/pkg/common/db/controller/group.go +++ b/pkg/common/db/controller/group.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 controller import ( diff --git a/pkg/common/db/controller/msg.go b/pkg/common/db/controller/msg.go index 6ce55deae..435e3e70b 100644 --- a/pkg/common/db/controller/msg.go +++ b/pkg/common/db/controller/msg.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 controller import ( diff --git a/pkg/common/db/controller/msg_test.go b/pkg/common/db/controller/msg_test.go index 6771bdab4..7e50b8489 100644 --- a/pkg/common/db/controller/msg_test.go +++ b/pkg/common/db/controller/msg_test.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 controller import ( diff --git a/pkg/common/db/controller/push.go b/pkg/common/db/controller/push.go index e0e5d4845..c4c761457 100644 --- a/pkg/common/db/controller/push.go +++ b/pkg/common/db/controller/push.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 controller import ( diff --git a/pkg/common/db/controller/storage.go b/pkg/common/db/controller/storage.go index 22b2274f3..ab20e7da8 100644 --- a/pkg/common/db/controller/storage.go +++ b/pkg/common/db/controller/storage.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 controller import "C" diff --git a/pkg/common/db/controller/third.go b/pkg/common/db/controller/third.go index 276084920..906b9b2e4 100644 --- a/pkg/common/db/controller/third.go +++ b/pkg/common/db/controller/third.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 controller import ( diff --git a/pkg/common/db/controller/user.go b/pkg/common/db/controller/user.go index 9a2e01b47..03224b61e 100644 --- a/pkg/common/db/controller/user.go +++ b/pkg/common/db/controller/user.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 controller import ( diff --git a/pkg/common/db/localcache/conversation.go b/pkg/common/db/localcache/conversation.go index 3c188c90e..de9f0401d 100644 --- a/pkg/common/db/localcache/conversation.go +++ b/pkg/common/db/localcache/conversation.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 localcache import ( diff --git a/pkg/common/db/localcache/group.go b/pkg/common/db/localcache/group.go index ea66d122c..d58d0a8eb 100644 --- a/pkg/common/db/localcache/group.go +++ b/pkg/common/db/localcache/group.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 localcache import ( diff --git a/pkg/common/db/localcache/meta_local_cache.go b/pkg/common/db/localcache/meta_local_cache.go index e0c30e523..ed9389c27 100644 --- a/pkg/common/db/localcache/meta_local_cache.go +++ b/pkg/common/db/localcache/meta_local_cache.go @@ -1 +1,15 @@ +// Copyright © 2023 OpenIM. 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 localcache diff --git a/pkg/common/db/obj/minio.go b/pkg/common/db/obj/minio.go index 2b39fff8b..ffd8684c9 100644 --- a/pkg/common/db/obj/minio.go +++ b/pkg/common/db/obj/minio.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 obj import ( diff --git a/pkg/common/db/obj/obj.go b/pkg/common/db/obj/obj.go index 00c8b86b1..d8f5d9390 100644 --- a/pkg/common/db/obj/obj.go +++ b/pkg/common/db/obj/obj.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 obj import ( diff --git a/pkg/common/db/ormutil/utils.go b/pkg/common/db/ormutil/utils.go index c92b091ef..7e4bd4f71 100644 --- a/pkg/common/db/ormutil/utils.go +++ b/pkg/common/db/ormutil/utils.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 ormutil import ( diff --git a/pkg/common/db/relation/black_model.go b/pkg/common/db/relation/black_model.go index 736d9ed01..ca90f43a7 100644 --- a/pkg/common/db/relation/black_model.go +++ b/pkg/common/db/relation/black_model.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 relation import ( diff --git a/pkg/common/db/relation/chat_log_model.go b/pkg/common/db/relation/chat_log_model.go index ef6dd2a8a..c4068e3f7 100644 --- a/pkg/common/db/relation/chat_log_model.go +++ b/pkg/common/db/relation/chat_log_model.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 relation import ( diff --git a/pkg/common/db/relation/conversation_model.go b/pkg/common/db/relation/conversation_model.go index cd67ad165..47be971c0 100644 --- a/pkg/common/db/relation/conversation_model.go +++ b/pkg/common/db/relation/conversation_model.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 relation import ( diff --git a/pkg/common/db/relation/friend_model.go b/pkg/common/db/relation/friend_model.go index 3baaa50cc..5a54f9b7c 100644 --- a/pkg/common/db/relation/friend_model.go +++ b/pkg/common/db/relation/friend_model.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 relation import ( diff --git a/pkg/common/db/relation/friend_request_model.go b/pkg/common/db/relation/friend_request_model.go index 1673d6dcf..06fd08ff6 100644 --- a/pkg/common/db/relation/friend_request_model.go +++ b/pkg/common/db/relation/friend_request_model.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 relation import ( diff --git a/pkg/common/db/relation/group_member_model.go b/pkg/common/db/relation/group_member_model.go index 78ab4357c..8f5aa937d 100644 --- a/pkg/common/db/relation/group_member_model.go +++ b/pkg/common/db/relation/group_member_model.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 relation import ( diff --git a/pkg/common/db/relation/group_model.go b/pkg/common/db/relation/group_model.go index fbcb5763b..8e3431c83 100644 --- a/pkg/common/db/relation/group_model.go +++ b/pkg/common/db/relation/group_model.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 relation import ( diff --git a/pkg/common/db/relation/group_request_model.go b/pkg/common/db/relation/group_request_model.go index 9d12005ae..0220f308e 100644 --- a/pkg/common/db/relation/group_request_model.go +++ b/pkg/common/db/relation/group_request_model.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 relation import ( diff --git a/pkg/common/db/relation/meta_db.go b/pkg/common/db/relation/meta_db.go index 2c937f0cb..60e4a5464 100644 --- a/pkg/common/db/relation/meta_db.go +++ b/pkg/common/db/relation/meta_db.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 relation import ( diff --git a/pkg/common/db/relation/mysql_init.go b/pkg/common/db/relation/mysql_init.go index 89ee8545e..67419c7bf 100644 --- a/pkg/common/db/relation/mysql_init.go +++ b/pkg/common/db/relation/mysql_init.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 relation import ( diff --git a/pkg/common/db/relation/object_hash_model.go b/pkg/common/db/relation/object_hash_model.go index 789929c5f..5ff8cd47a 100644 --- a/pkg/common/db/relation/object_hash_model.go +++ b/pkg/common/db/relation/object_hash_model.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 relation import ( diff --git a/pkg/common/db/relation/object_info_model.go b/pkg/common/db/relation/object_info_model.go index aa48ae491..642ae8ef2 100644 --- a/pkg/common/db/relation/object_info_model.go +++ b/pkg/common/db/relation/object_info_model.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 relation import ( diff --git a/pkg/common/db/relation/object_put_model.go b/pkg/common/db/relation/object_put_model.go index 12808c215..d2df2636d 100644 --- a/pkg/common/db/relation/object_put_model.go +++ b/pkg/common/db/relation/object_put_model.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 relation import ( diff --git a/pkg/common/db/relation/user_model.go b/pkg/common/db/relation/user_model.go index 013666859..89a1773d4 100644 --- a/pkg/common/db/relation/user_model.go +++ b/pkg/common/db/relation/user_model.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 relation import ( diff --git a/pkg/common/db/table/relation/black.go b/pkg/common/db/table/relation/black.go index bcfffc6db..ec7ca7a56 100644 --- a/pkg/common/db/table/relation/black.go +++ b/pkg/common/db/table/relation/black.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 relation import ( diff --git a/pkg/common/db/table/relation/chatlog.go b/pkg/common/db/table/relation/chatlog.go index f43d8a43a..c67edb1fe 100644 --- a/pkg/common/db/table/relation/chatlog.go +++ b/pkg/common/db/table/relation/chatlog.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 relation import ( diff --git a/pkg/common/db/table/relation/conversation.go b/pkg/common/db/table/relation/conversation.go index f08ea90e3..5d6d061b1 100644 --- a/pkg/common/db/table/relation/conversation.go +++ b/pkg/common/db/table/relation/conversation.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 relation import "context" diff --git a/pkg/common/db/table/relation/friend.go b/pkg/common/db/table/relation/friend.go index 43724141f..58d8d1d34 100644 --- a/pkg/common/db/table/relation/friend.go +++ b/pkg/common/db/table/relation/friend.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 relation import ( diff --git a/pkg/common/db/table/relation/friend_request.go b/pkg/common/db/table/relation/friend_request.go index 59160c819..794f33aaf 100644 --- a/pkg/common/db/table/relation/friend_request.go +++ b/pkg/common/db/table/relation/friend_request.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 relation import ( diff --git a/pkg/common/db/table/relation/group.go b/pkg/common/db/table/relation/group.go index 70ccad9b4..be0afbcc3 100644 --- a/pkg/common/db/table/relation/group.go +++ b/pkg/common/db/table/relation/group.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 relation import ( diff --git a/pkg/common/db/table/relation/group_member.go b/pkg/common/db/table/relation/group_member.go index 6640a9402..bfde72834 100644 --- a/pkg/common/db/table/relation/group_member.go +++ b/pkg/common/db/table/relation/group_member.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 relation import ( diff --git a/pkg/common/db/table/relation/group_request.go b/pkg/common/db/table/relation/group_request.go index 816d3ad35..ba68bcd7b 100644 --- a/pkg/common/db/table/relation/group_request.go +++ b/pkg/common/db/table/relation/group_request.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 relation import ( diff --git a/pkg/common/db/table/relation/object_hash.go b/pkg/common/db/table/relation/object_hash.go index 86d038fc4..231f21a81 100644 --- a/pkg/common/db/table/relation/object_hash.go +++ b/pkg/common/db/table/relation/object_hash.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 relation import ( diff --git a/pkg/common/db/table/relation/object_info.go b/pkg/common/db/table/relation/object_info.go index 60d8d3c63..e7b7fb57c 100644 --- a/pkg/common/db/table/relation/object_info.go +++ b/pkg/common/db/table/relation/object_info.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 relation import ( diff --git a/pkg/common/db/table/relation/object_put.go b/pkg/common/db/table/relation/object_put.go index 62ffe61e7..49b37826c 100644 --- a/pkg/common/db/table/relation/object_put.go +++ b/pkg/common/db/table/relation/object_put.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 relation import ( diff --git a/pkg/common/db/table/relation/user.go b/pkg/common/db/table/relation/user.go index 35b52602f..7d2bf0cf5 100644 --- a/pkg/common/db/table/relation/user.go +++ b/pkg/common/db/table/relation/user.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 relation import ( diff --git a/pkg/common/db/table/relation/utils.go b/pkg/common/db/table/relation/utils.go index d3bd8d312..c8c59b390 100644 --- a/pkg/common/db/table/relation/utils.go +++ b/pkg/common/db/table/relation/utils.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 relation import ( diff --git a/pkg/common/db/table/unrelation/common.go b/pkg/common/db/table/unrelation/common.go index 9834628a9..bd46ccc2a 100644 --- a/pkg/common/db/table/unrelation/common.go +++ b/pkg/common/db/table/unrelation/common.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 unrelation type CommonUserModel struct { diff --git a/pkg/common/db/table/unrelation/extend_msg_set.go b/pkg/common/db/table/unrelation/extend_msg_set.go index 76588e679..472daf5fa 100644 --- a/pkg/common/db/table/unrelation/extend_msg_set.go +++ b/pkg/common/db/table/unrelation/extend_msg_set.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 unrelation import ( diff --git a/pkg/common/db/table/unrelation/msg.go b/pkg/common/db/table/unrelation/msg.go index 950a60689..57f9b4cca 100644 --- a/pkg/common/db/table/unrelation/msg.go +++ b/pkg/common/db/table/unrelation/msg.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 unrelation import ( diff --git a/pkg/common/db/table/unrelation/super_group.go b/pkg/common/db/table/unrelation/super_group.go index 4875c490d..80c3ef9c7 100644 --- a/pkg/common/db/table/unrelation/super_group.go +++ b/pkg/common/db/table/unrelation/super_group.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 unrelation import ( diff --git a/pkg/common/db/tx/gorm.go b/pkg/common/db/tx/gorm.go index 4d5ccd5be..98e71cb9f 100644 --- a/pkg/common/db/tx/gorm.go +++ b/pkg/common/db/tx/gorm.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 tx import ( diff --git a/pkg/common/db/tx/mongo.go b/pkg/common/db/tx/mongo.go index cd7d24607..a0c38e372 100644 --- a/pkg/common/db/tx/mongo.go +++ b/pkg/common/db/tx/mongo.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 tx import ( diff --git a/pkg/common/db/tx/tx.go b/pkg/common/db/tx/tx.go index e182271ff..9a6fe02ef 100644 --- a/pkg/common/db/tx/tx.go +++ b/pkg/common/db/tx/tx.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 tx import "context" diff --git a/pkg/common/db/unrelation/extend_msg.go b/pkg/common/db/unrelation/extend_msg.go index 2abe1d0bd..17e0b2e19 100644 --- a/pkg/common/db/unrelation/extend_msg.go +++ b/pkg/common/db/unrelation/extend_msg.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 unrelation import ( diff --git a/pkg/common/db/unrelation/mongo.go b/pkg/common/db/unrelation/mongo.go index 8325abff9..51b9e4b7e 100644 --- a/pkg/common/db/unrelation/mongo.go +++ b/pkg/common/db/unrelation/mongo.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 unrelation import ( diff --git a/pkg/common/db/unrelation/msg.go b/pkg/common/db/unrelation/msg.go index 4c48f6eb3..cecbf2301 100644 --- a/pkg/common/db/unrelation/msg.go +++ b/pkg/common/db/unrelation/msg.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 unrelation import ( diff --git a/pkg/common/db/unrelation/super_group.go b/pkg/common/db/unrelation/super_group.go index 3dc9f61bd..f2f867c49 100644 --- a/pkg/common/db/unrelation/super_group.go +++ b/pkg/common/db/unrelation/super_group.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 unrelation import ( diff --git a/pkg/common/kafka/consumer.go b/pkg/common/kafka/consumer.go index 8a21a14d6..67bc3977b 100644 --- a/pkg/common/kafka/consumer.go +++ b/pkg/common/kafka/consumer.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 kafka import ( diff --git a/pkg/common/kafka/producer.go b/pkg/common/kafka/producer.go index 6e5868f24..4c4ebc460 100644 --- a/pkg/common/kafka/producer.go +++ b/pkg/common/kafka/producer.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 kafka import ( diff --git a/pkg/common/log/color.go b/pkg/common/log/color.go index 2cb4fe078..9d1121d61 100644 --- a/pkg/common/log/color.go +++ b/pkg/common/log/color.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 log import ( diff --git a/pkg/common/log/logger.go b/pkg/common/log/logger.go index 221c0ded5..cfbb91bdd 100644 --- a/pkg/common/log/logger.go +++ b/pkg/common/log/logger.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 log import "context" diff --git a/pkg/common/log/sql_logger.go b/pkg/common/log/sql_logger.go index 1785b211c..40b483474 100644 --- a/pkg/common/log/sql_logger.go +++ b/pkg/common/log/sql_logger.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 log import ( diff --git a/pkg/common/log/zap.go b/pkg/common/log/zap.go index a173ac055..9cf3fe144 100644 --- a/pkg/common/log/zap.go +++ b/pkg/common/log/zap.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 log import ( diff --git a/pkg/common/log/zk_logger.go b/pkg/common/log/zk_logger.go index d69077d73..3579e2022 100644 --- a/pkg/common/log/zk_logger.go +++ b/pkg/common/log/zk_logger.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 log import ( diff --git a/pkg/common/mcontext/ctx.go b/pkg/common/mcontext/ctx.go index 5dee1341a..bbca660b9 100644 --- a/pkg/common/mcontext/ctx.go +++ b/pkg/common/mcontext/ctx.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 mcontext import ( diff --git a/pkg/common/mw/check.go b/pkg/common/mw/check.go index 5c8a3ee0c..81ea7e017 100644 --- a/pkg/common/mw/check.go +++ b/pkg/common/mw/check.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 mw import ( diff --git a/pkg/common/mw/check_test.go b/pkg/common/mw/check_test.go index 091942550..b893d7e4e 100644 --- a/pkg/common/mw/check_test.go +++ b/pkg/common/mw/check_test.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 mw import ( diff --git a/pkg/common/mw/gin.go b/pkg/common/mw/gin.go index 42798d060..65f98dca3 100644 --- a/pkg/common/mw/gin.go +++ b/pkg/common/mw/gin.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 mw import ( diff --git a/pkg/common/mw/intercept_chain.go b/pkg/common/mw/intercept_chain.go index 8feebab90..ae5361631 100644 --- a/pkg/common/mw/intercept_chain.go +++ b/pkg/common/mw/intercept_chain.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 mw import ( diff --git a/pkg/common/mw/rpc_client_interceptor.go b/pkg/common/mw/rpc_client_interceptor.go index 530847280..40933810c 100644 --- a/pkg/common/mw/rpc_client_interceptor.go +++ b/pkg/common/mw/rpc_client_interceptor.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 mw import ( diff --git a/pkg/common/mw/rpc_server_interceptor.go b/pkg/common/mw/rpc_server_interceptor.go index 4dcd4e582..01eb77b89 100644 --- a/pkg/common/mw/rpc_server_interceptor.go +++ b/pkg/common/mw/rpc_server_interceptor.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 mw import ( diff --git a/pkg/common/mw/specialerror/error.go b/pkg/common/mw/specialerror/error.go index a29ea505a..b8b8d27ae 100644 --- a/pkg/common/mw/specialerror/error.go +++ b/pkg/common/mw/specialerror/error.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 specialerror import "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" diff --git a/pkg/common/network/ip.go b/pkg/common/network/ip.go index 2d5a5b09c..bf062429d 100644 --- a/pkg/common/network/ip.go +++ b/pkg/common/network/ip.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 network import ( diff --git a/pkg/common/prome/gather.go b/pkg/common/prome/gather.go index 271488966..910df71d9 100644 --- a/pkg/common/prome/gather.go +++ b/pkg/common/prome/gather.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 prome import ( diff --git a/pkg/common/prome/prometheus.go b/pkg/common/prome/prometheus.go index 299f07d43..d66b1df70 100644 --- a/pkg/common/prome/prometheus.go +++ b/pkg/common/prome/prometheus.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 prome import ( diff --git a/pkg/common/tokenverify/jwt_token.go b/pkg/common/tokenverify/jwt_token.go index 9f4088eff..30e9ac9d1 100644 --- a/pkg/common/tokenverify/jwt_token.go +++ b/pkg/common/tokenverify/jwt_token.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 ( diff --git a/pkg/common/tokenverify/jwt_token_test.go b/pkg/common/tokenverify/jwt_token_test.go index b8390b45d..4e8e98c41 100644 --- a/pkg/common/tokenverify/jwt_token_test.go +++ b/pkg/common/tokenverify/jwt_token_test.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 ( diff --git a/pkg/discoveryregistry/discovery_register.go b/pkg/discoveryregistry/discovery_register.go index 01ed88d5b..50e720f97 100644 --- a/pkg/discoveryregistry/discovery_register.go +++ b/pkg/discoveryregistry/discovery_register.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 discoveryregistry import ( diff --git a/pkg/discoveryregistry/zookeeper/conf.go b/pkg/discoveryregistry/zookeeper/conf.go index 55532a370..034c525ba 100644 --- a/pkg/discoveryregistry/zookeeper/conf.go +++ b/pkg/discoveryregistry/zookeeper/conf.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 zookeeper import ( diff --git a/pkg/discoveryregistry/zookeeper/discover.go b/pkg/discoveryregistry/zookeeper/discover.go index 912c001d9..3966d315c 100644 --- a/pkg/discoveryregistry/zookeeper/discover.go +++ b/pkg/discoveryregistry/zookeeper/discover.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 zookeeper import ( diff --git a/pkg/discoveryregistry/zookeeper/register.go b/pkg/discoveryregistry/zookeeper/register.go index ab75f488b..1531980bb 100644 --- a/pkg/discoveryregistry/zookeeper/register.go +++ b/pkg/discoveryregistry/zookeeper/register.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 zookeeper import ( diff --git a/pkg/discoveryregistry/zookeeper/resolver.go b/pkg/discoveryregistry/zookeeper/resolver.go index 74ed04455..e395a8f34 100644 --- a/pkg/discoveryregistry/zookeeper/resolver.go +++ b/pkg/discoveryregistry/zookeeper/resolver.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 zookeeper import ( diff --git a/pkg/discoveryregistry/zookeeper/zk.go b/pkg/discoveryregistry/zookeeper/zk.go index d6287e47b..b9b68c528 100644 --- a/pkg/discoveryregistry/zookeeper/zk.go +++ b/pkg/discoveryregistry/zookeeper/zk.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 zookeeper import ( diff --git a/pkg/errs/code.go b/pkg/errs/code.go index 3104ed729..b153e4e40 100644 --- a/pkg/errs/code.go +++ b/pkg/errs/code.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 errs // UnknownCode 没有解析到code或解析的code=0 diff --git a/pkg/errs/coderr.go b/pkg/errs/coderr.go index 506a0ddcc..af88a6353 100644 --- a/pkg/errs/coderr.go +++ b/pkg/errs/coderr.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 errs import ( diff --git a/pkg/errs/predefine.go b/pkg/errs/predefine.go index 740875c6f..4890a0996 100644 --- a/pkg/errs/predefine.go +++ b/pkg/errs/predefine.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 errs var ( diff --git a/pkg/errs/relation.go b/pkg/errs/relation.go index 5d87ab59e..76578f4bb 100644 --- a/pkg/errs/relation.go +++ b/pkg/errs/relation.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 errs var Relation = &relation{m: make(map[int]map[int]struct{})} diff --git a/pkg/proto/auth/auth.go b/pkg/proto/auth/auth.go index e7189afab..45e935558 100644 --- a/pkg/proto/auth/auth.go +++ b/pkg/proto/auth/auth.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 auth import "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" diff --git a/pkg/proto/auth/auth.proto b/pkg/proto/auth/auth.proto index 6894db8db..29c008cbe 100644 --- a/pkg/proto/auth/auth.proto +++ b/pkg/proto/auth/auth.proto @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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.auth; option go_package = "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/auth"; diff --git a/pkg/proto/conversation/conversation.go b/pkg/proto/conversation/conversation.go index 7b4d8e242..64b467ddb 100644 --- a/pkg/proto/conversation/conversation.go +++ b/pkg/proto/conversation/conversation.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 conversation import "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" diff --git a/pkg/proto/conversation/conversation.proto b/pkg/proto/conversation/conversation.proto index 967109520..b08366af7 100644 --- a/pkg/proto/conversation/conversation.proto +++ b/pkg/proto/conversation/conversation.proto @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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.conversation; import "wrapperspb/wrapperspb.proto"; diff --git a/pkg/proto/errinfo/errinfo.proto b/pkg/proto/errinfo/errinfo.proto index 77182d1d5..11fddec34 100644 --- a/pkg/proto/errinfo/errinfo.proto +++ b/pkg/proto/errinfo/errinfo.proto @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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/proto/friend/friend.go b/pkg/proto/friend/friend.go index 8b9879406..f2ad6a7a4 100644 --- a/pkg/proto/friend/friend.go +++ b/pkg/proto/friend/friend.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 friend import "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" diff --git a/pkg/proto/friend/friend.proto b/pkg/proto/friend/friend.proto index 30b30f752..98a9e81e9 100644 --- a/pkg/proto/friend/friend.proto +++ b/pkg/proto/friend/friend.proto @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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.friend; import "sdkws/sdkws.proto"; diff --git a/pkg/proto/gen.sh b/pkg/proto/gen.sh index 930a636ec..3c06bbfa7 100644 --- a/pkg/proto/gen.sh +++ b/pkg/proto/gen.sh @@ -1,3 +1,17 @@ +# Copyright © 2023 OpenIM. 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:./auth --go_opt=module=github.com/OpenIMSDK/Open-IM-Server/pkg/proto/auth auth/auth.proto protoc --go_out=plugins=grpc:./conversation --go_opt=module=github.com/OpenIMSDK/Open-IM-Server/pkg/proto/conversation conversation/conversation.proto protoc --go_out=plugins=grpc:./errinfo --go_opt=module=github.com/OpenIMSDK/Open-IM-Server/pkg/proto/errinfo errinfo/errinfo.proto diff --git a/pkg/proto/group/group.go b/pkg/proto/group/group.go index 24e4a47c7..64e7f0f61 100644 --- a/pkg/proto/group/group.go +++ b/pkg/proto/group/group.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 group import "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" diff --git a/pkg/proto/group/group.proto b/pkg/proto/group/group.proto index 432da16db..9d02f58f7 100644 --- a/pkg/proto/group/group.proto +++ b/pkg/proto/group/group.proto @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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.group; import "sdkws/sdkws.proto"; diff --git a/pkg/proto/msg/msg.go b/pkg/proto/msg/msg.go index 38f503321..a221639ee 100644 --- a/pkg/proto/msg/msg.go +++ b/pkg/proto/msg/msg.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 msg import "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" diff --git a/pkg/proto/msg/msg.proto b/pkg/proto/msg/msg.proto index fc623e1b6..9fa093edf 100644 --- a/pkg/proto/msg/msg.proto +++ b/pkg/proto/msg/msg.proto @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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.msg; import "sdkws/sdkws.proto"; diff --git a/pkg/proto/msggateway/msggateway.go b/pkg/proto/msggateway/msggateway.go index 3d638d5d8..5e0c85b45 100644 --- a/pkg/proto/msggateway/msggateway.go +++ b/pkg/proto/msggateway/msggateway.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 msggateway import "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" diff --git a/pkg/proto/msggateway/msggateway.proto b/pkg/proto/msggateway/msggateway.proto index 2127daeba..0f6c0bd5f 100644 --- a/pkg/proto/msggateway/msggateway.proto +++ b/pkg/proto/msggateway/msggateway.proto @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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.msggateway; import "sdkws/sdkws.proto"; diff --git a/pkg/proto/push/push.go b/pkg/proto/push/push.go index d7c1b5b5a..2f117acda 100644 --- a/pkg/proto/push/push.go +++ b/pkg/proto/push/push.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 push import "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" diff --git a/pkg/proto/push/push.proto b/pkg/proto/push/push.proto index a5c0ad8a7..1f511b225 100644 --- a/pkg/proto/push/push.proto +++ b/pkg/proto/push/push.proto @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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.push; import "sdkws/sdkws.proto"; diff --git a/pkg/proto/sdkws/sdkws.go b/pkg/proto/sdkws/sdkws.go index 094cb823b..1c0888745 100644 --- a/pkg/proto/sdkws/sdkws.go +++ b/pkg/proto/sdkws/sdkws.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 sdkws import ( diff --git a/pkg/proto/sdkws/sdkws.proto b/pkg/proto/sdkws/sdkws.proto index 4db0b1648..4e81502d3 100644 --- a/pkg/proto/sdkws/sdkws.proto +++ b/pkg/proto/sdkws/sdkws.proto @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 "wrapperspb/wrapperspb.proto"; diff --git a/pkg/proto/statistics/statistics.proto b/pkg/proto/statistics/statistics.proto index 70980edd3..160ad1dcd 100644 --- a/pkg/proto/statistics/statistics.proto +++ b/pkg/proto/statistics/statistics.proto @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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.statistics; option go_package = "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/statistics"; diff --git a/pkg/proto/third/third.go b/pkg/proto/third/third.go index 88ee316bd..9562255fc 100644 --- a/pkg/proto/third/third.go +++ b/pkg/proto/third/third.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 third import "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" diff --git a/pkg/proto/third/third.proto b/pkg/proto/third/third.proto index 7021dfaef..8cdad7562 100644 --- a/pkg/proto/third/third.proto +++ b/pkg/proto/third/third.proto @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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.third; option go_package = "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/third"; diff --git a/pkg/proto/user/user.go b/pkg/proto/user/user.go index 26b0b1b31..09ae39c7e 100644 --- a/pkg/proto/user/user.go +++ b/pkg/proto/user/user.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 user import "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" diff --git a/pkg/proto/user/user.proto b/pkg/proto/user/user.proto index 6cdbf53d9..e63959aff 100644 --- a/pkg/proto/user/user.proto +++ b/pkg/proto/user/user.proto @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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.user; import "sdkws/sdkws.proto"; diff --git a/pkg/proto/wrapperspb/wrapperspb.go b/pkg/proto/wrapperspb/wrapperspb.go index 229d07ede..7579c64f0 100644 --- a/pkg/proto/wrapperspb/wrapperspb.go +++ b/pkg/proto/wrapperspb/wrapperspb.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 wrapperspb import ( diff --git a/pkg/proto/wrapperspb/wrapperspb.proto b/pkg/proto/wrapperspb/wrapperspb.proto index 768b9fe86..ec1bdca20 100644 --- a/pkg/proto/wrapperspb/wrapperspb.proto +++ b/pkg/proto/wrapperspb/wrapperspb.proto @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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/rpcclient/auth.go b/pkg/rpcclient/auth.go index fc435aa24..aa13ed898 100644 --- a/pkg/rpcclient/auth.go +++ b/pkg/rpcclient/auth.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 rpcclient import ( diff --git a/pkg/rpcclient/conversation.go b/pkg/rpcclient/conversation.go index cc781e449..5cab1d689 100644 --- a/pkg/rpcclient/conversation.go +++ b/pkg/rpcclient/conversation.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 rpcclient import ( diff --git a/pkg/rpcclient/friend.go b/pkg/rpcclient/friend.go index 56875dc83..51b63700c 100644 --- a/pkg/rpcclient/friend.go +++ b/pkg/rpcclient/friend.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 rpcclient import ( diff --git a/pkg/rpcclient/group.go b/pkg/rpcclient/group.go index 399be6a77..06333234f 100644 --- a/pkg/rpcclient/group.go +++ b/pkg/rpcclient/group.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 rpcclient import ( diff --git a/pkg/rpcclient/msg.go b/pkg/rpcclient/msg.go index 43f30361a..aabc3768a 100644 --- a/pkg/rpcclient/msg.go +++ b/pkg/rpcclient/msg.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 rpcclient import ( diff --git a/pkg/rpcclient/notification/common.go b/pkg/rpcclient/notification/common.go index ea0174000..09d8b8798 100644 --- a/pkg/rpcclient/notification/common.go +++ b/pkg/rpcclient/notification/common.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 notification type CommonUser interface { diff --git a/pkg/rpcclient/notification/conevrsation.go b/pkg/rpcclient/notification/conevrsation.go index 8fb11ba97..12e851375 100644 --- a/pkg/rpcclient/notification/conevrsation.go +++ b/pkg/rpcclient/notification/conevrsation.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 notification import ( diff --git a/pkg/rpcclient/notification/extend_msg.go b/pkg/rpcclient/notification/extend_msg.go index 1bef5c9b4..85e5b1903 100644 --- a/pkg/rpcclient/notification/extend_msg.go +++ b/pkg/rpcclient/notification/extend_msg.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 notification import ( diff --git a/pkg/rpcclient/notification/friend.go b/pkg/rpcclient/notification/friend.go index 495238b03..e7df2e6cd 100644 --- a/pkg/rpcclient/notification/friend.go +++ b/pkg/rpcclient/notification/friend.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 notification import ( diff --git a/pkg/rpcclient/notification/group.go b/pkg/rpcclient/notification/group.go index f93f0786a..fcc32b092 100644 --- a/pkg/rpcclient/notification/group.go +++ b/pkg/rpcclient/notification/group.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 notification import ( diff --git a/pkg/rpcclient/push.go b/pkg/rpcclient/push.go index 5359c31ee..8e19782bd 100644 --- a/pkg/rpcclient/push.go +++ b/pkg/rpcclient/push.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 rpcclient import ( diff --git a/pkg/rpcclient/third.go b/pkg/rpcclient/third.go index c657c02a1..4f57cbd69 100644 --- a/pkg/rpcclient/third.go +++ b/pkg/rpcclient/third.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 rpcclient import ( diff --git a/pkg/rpcclient/user.go b/pkg/rpcclient/user.go index 383d0cc67..17dec167c 100644 --- a/pkg/rpcclient/user.go +++ b/pkg/rpcclient/user.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 rpcclient import ( diff --git a/pkg/startrpc/start.go b/pkg/startrpc/start.go index de5be74e5..3eeaaa3a2 100644 --- a/pkg/startrpc/start.go +++ b/pkg/startrpc/start.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 startrpc import ( diff --git a/pkg/statistics/statistics.go b/pkg/statistics/statistics.go index 87cba474c..2a6ae01ae 100644 --- a/pkg/statistics/statistics.go +++ b/pkg/statistics/statistics.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 statistics import ( diff --git a/pkg/utils/base64.go b/pkg/utils/base64.go index 3f01c1488..9502dcde8 100644 --- a/pkg/utils/base64.go +++ b/pkg/utils/base64.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 utils import "encoding/base64" diff --git a/pkg/utils/callback.go b/pkg/utils/callback.go index 139d166c0..7eed52409 100644 --- a/pkg/utils/callback.go +++ b/pkg/utils/callback.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 utils import ( diff --git a/pkg/utils/encryption.go b/pkg/utils/encryption.go index a4862de2e..23266d8f7 100644 --- a/pkg/utils/encryption.go +++ b/pkg/utils/encryption.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 utils import ( diff --git a/pkg/utils/file.go b/pkg/utils/file.go index 7aa7719bd..79528661d 100644 --- a/pkg/utils/file.go +++ b/pkg/utils/file.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 utils import ( diff --git a/pkg/utils/get_server_ip.go b/pkg/utils/get_server_ip.go index b8056af9d..aad0bf2cc 100644 --- a/pkg/utils/get_server_ip.go +++ b/pkg/utils/get_server_ip.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 utils import ( diff --git a/pkg/utils/id.go b/pkg/utils/id.go index 509578df7..25e942f36 100644 --- a/pkg/utils/id.go +++ b/pkg/utils/id.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 utils import ( diff --git a/pkg/utils/id_test.go b/pkg/utils/id_test.go index 3c0d5938e..d6ab3e665 100644 --- a/pkg/utils/id_test.go +++ b/pkg/utils/id_test.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 utils import "testing" diff --git a/pkg/utils/image.go b/pkg/utils/image.go index 26060f1de..f93591f9e 100644 --- a/pkg/utils/image.go +++ b/pkg/utils/image.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 utils import ( diff --git a/pkg/utils/image_test.go b/pkg/utils/image_test.go index f28cfc89d..87d78620f 100644 --- a/pkg/utils/image_test.go +++ b/pkg/utils/image_test.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 utils import ( diff --git a/pkg/utils/map.go b/pkg/utils/map.go index 7a5fb2d6b..cd7f3f1de 100644 --- a/pkg/utils/map.go +++ b/pkg/utils/map.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 utils import ( diff --git a/pkg/utils/md5_test.go b/pkg/utils/md5_test.go index 63eec8077..1add67f32 100644 --- a/pkg/utils/md5_test.go +++ b/pkg/utils/md5_test.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 utils import ( diff --git a/pkg/utils/options.go b/pkg/utils/options.go index a3b265e14..0ade70dfe 100644 --- a/pkg/utils/options.go +++ b/pkg/utils/options.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 utils import "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" diff --git a/pkg/utils/page.go b/pkg/utils/page.go index 61942a5d7..ad19decb0 100644 --- a/pkg/utils/page.go +++ b/pkg/utils/page.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 utils import "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" diff --git a/pkg/utils/platform_number_id_to_name_test.go b/pkg/utils/platform_number_id_to_name_test.go index 78569aed4..47c4016ed 100644 --- a/pkg/utils/platform_number_id_to_name_test.go +++ b/pkg/utils/platform_number_id_to_name_test.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 utils import ( diff --git a/pkg/utils/retry/retry.go b/pkg/utils/retry/retry.go index 8877dd0a5..eb2a387cb 100644 --- a/pkg/utils/retry/retry.go +++ b/pkg/utils/retry/retry.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 retry import ( diff --git a/pkg/utils/retry/stratey.go b/pkg/utils/retry/stratey.go index e045684e8..8dca54161 100644 --- a/pkg/utils/retry/stratey.go +++ b/pkg/utils/retry/stratey.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 retry import "time" diff --git a/pkg/utils/splitter/tools.go b/pkg/utils/splitter/tools.go index 40bd7dee2..d36b9c3be 100644 --- a/pkg/utils/splitter/tools.go +++ b/pkg/utils/splitter/tools.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 splitter type SplitResult struct { diff --git a/pkg/utils/utils.go b/pkg/utils/utils.go index 1138313d2..418e65d34 100644 --- a/pkg/utils/utils.go +++ b/pkg/utils/utils.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 utils import ( diff --git a/pkg/utils/utils_v2.go b/pkg/utils/utils_v2.go index 777308fd7..f4cc44871 100644 --- a/pkg/utils/utils_v2.go +++ b/pkg/utils/utils_v2.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 utils import ( diff --git a/pkg/utils/utils_v2_test.go b/pkg/utils/utils_v2_test.go index f5aeef538..ba55b8941 100644 --- a/pkg/utils/utils_v2_test.go +++ b/pkg/utils/utils_v2_test.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. 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 utils import ( diff --git a/scripts/batch_build_all_service.sh b/scripts/batch_build_all_service.sh index bf780008f..6c74e1957 100755 --- a/scripts/batch_build_all_service.sh +++ b/scripts/batch_build_all_service.sh @@ -1,4 +1,18 @@ #!/usr/bin/env bash +# Copyright © 2023 OpenIM. 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/batch_start_all.sh b/scripts/batch_start_all.sh index eebf96796..e917d7003 100755 --- a/scripts/batch_start_all.sh +++ b/scripts/batch_start_all.sh @@ -1,4 +1,18 @@ #!/usr/bin/env bash +# Copyright © 2023 OpenIM. 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 the total startup scripts #fixme The full name of the shell scripts that needs to be started is placed in the need_to_start_server_shell array diff --git a/scripts/build_all_service.sh b/scripts/build_all_service.sh index 0d9814bec..a6495939d 100755 --- a/scripts/build_all_service.sh +++ b/scripts/build_all_service.sh @@ -1,4 +1,18 @@ #!/usr/bin/env bash +# Copyright © 2023 OpenIM. 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_images.sh b/scripts/build_images.sh index ad37e24e4..ad47cdb24 100755 --- a/scripts/build_images.sh +++ b/scripts/build_images.sh @@ -1,4 +1,18 @@ #!/usr/bin/env bash +# Copyright © 2023 OpenIM. 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/open_im_server:v1.0.5 rm Open-IM-Server -rf git clone https://github.com/OpenIMSDK/Open-IM-Server.git --recursive diff --git a/scripts/build_push_k8s_images.sh b/scripts/build_push_k8s_images.sh index 432457298..ff9887c56 100755 --- a/scripts/build_push_k8s_images.sh +++ b/scripts/build_push_k8s_images.sh @@ -1,4 +1,18 @@ #!/usr/bin/env bash +# Copyright © 2023 OpenIM. 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. + version=errcode repository=${1} if [[ -z ${repository} ]] diff --git a/scripts/check_all.sh b/scripts/check_all.sh index e4feb7f93..16fec32ff 100755 --- a/scripts/check_all.sh +++ b/scripts/check_all.sh @@ -1,4 +1,18 @@ #!/usr/bin/env bash +# Copyright © 2023 OpenIM. 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/coverage.sh b/scripts/coverage.sh index 9fb77b59a..d4605ee3f 100644 --- a/scripts/coverage.sh +++ b/scripts/coverage.sh @@ -1,4 +1,18 @@ #!/usr/bin/env bash +# Copyright © 2023 OpenIM. 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. + # http://stackoverflow.com/a/21142256/2055281 diff --git a/scripts/docker_check_service.sh b/scripts/docker_check_service.sh index 4e7d52af3..4acbde407 100755 --- a/scripts/docker_check_service.sh +++ b/scripts/docker_check_service.sh @@ -1,4 +1,18 @@ #!/usr/bin/env bash +# Copyright © 2023 OpenIM. 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. + echo "docker-compose ps..........................." cd .. diff --git a/scripts/docker_start_all.sh b/scripts/docker_start_all.sh index d4ded7121..8ed198cae 100755 --- a/scripts/docker_start_all.sh +++ b/scripts/docker_start_all.sh @@ -1,4 +1,18 @@ #!/usr/bin/env bash +# Copyright © 2023 OpenIM. 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 the total startup scripts #fixme The full name of the shell scripts that needs to be started is placed in the need_to_start_server_shell array diff --git a/scripts/ensure_tag.sh b/scripts/ensure_tag.sh new file mode 100644 index 000000000..2da3c404f --- /dev/null +++ b/scripts/ensure_tag.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash +# Copyright © 2023 OpenIM. 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. + +version="${VERSION}" +if [ "${version}" == "" ];then + version=v`gsemver bump` +fi + +if [ -z "`git tag -l ${version}`" ];then + git tag -a -m "release version ${version}" ${version} +fi diff --git a/scripts/enterprise/check_all.sh b/scripts/enterprise/check_all.sh index 0f6cb0d5c..f439404f1 100755 --- a/scripts/enterprise/check_all.sh +++ b/scripts/enterprise/check_all.sh @@ -1,4 +1,18 @@ #!/usr/bin/env bash +# Copyright © 2023 OpenIM. 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 ./enterprise/path_info.cfg diff --git a/scripts/enterprise/function.sh b/scripts/enterprise/function.sh index 97f19187a..e2dc96a25 100755 --- a/scripts/enterprise/function.sh +++ b/scripts/enterprise/function.sh @@ -1,4 +1,18 @@ #!/usr/bin/env bash +# Copyright © 2023 OpenIM. 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(){ diff --git a/scripts/env_check.sh b/scripts/env_check.sh index f51dca451..c6cfaf4bb 100755 --- a/scripts/env_check.sh +++ b/scripts/env_check.sh @@ -1,4 +1,18 @@ #!/usr/bin/env bash +# Copyright © 2023 OpenIM. 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 echo -e "check time synchronize.................................." diff --git a/scripts/function.sh b/scripts/function.sh index 97f19187a..e2dc96a25 100755 --- a/scripts/function.sh +++ b/scripts/function.sh @@ -1,4 +1,18 @@ #!/usr/bin/env bash +# Copyright © 2023 OpenIM. 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(){ diff --git a/scripts/githooks/pre-commit b/scripts/githooks/pre-commit index db9d7cf17..dbd84edef 100644 --- a/scripts/githooks/pre-commit +++ b/scripts/githooks/pre-commit @@ -28,7 +28,6 @@ LC_ALL=C local_branch="$(git rev-parse --abbrev-ref HEAD)" valid_branch_regex="^(main|master|develop)$|(feature|feat|release|hotfix|test|bug|ci|style|)\/[a-z0-9._-]+$|^HEAD$" - YELLOW="\e[93m" GREEN="\e[32m" RED="\e[31m" diff --git a/scripts/init_pwd.sh b/scripts/init_pwd.sh index d4b1caf48..fa8296724 100755 --- a/scripts/init_pwd.sh +++ b/scripts/init_pwd.sh @@ -1,3 +1,17 @@ +# Copyright © 2023 OpenIM. 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 ../.env diff --git a/scripts/lib/color.sh b/scripts/lib/color.sh index bdbe0e843..52caa78f8 100755 --- a/scripts/lib/color.sh +++ b/scripts/lib/color.sh @@ -1,8 +1,18 @@ #!/usr/bin/env bash +# Copyright © 2023 OpenIM. 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. -# Copyright 2020 Lingfei Kong . All rights reserved. -# Use of this source code is governed by a MIT style -# license that can be found in the LICENSE file. #Define color variables #Feature @@ -22,7 +32,7 @@ COLOR_BBLUE='\033[44m';COLOR_BMAGENTA='\033[45m'; COLOR_BCYAN='\033[46m';COLOR_BWHITE='\033[47m'; # Print colors you can use -iam::color::print_color() +openim::color::print_color() { echo echo -e ${bmagenta}--back-color:${normal} diff --git a/scripts/lib/golang.sh b/scripts/lib/golang.sh index f58e08649..1353ec2d2 100755 --- a/scripts/lib/golang.sh +++ b/scripts/lib/golang.sh @@ -1,152 +1,162 @@ #!/usr/bin/env bash +# Copyright © 2023 OpenIM. 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. -# Copyright 2020 Lingfei Kong . All rights reserved. -# Use of this source code is governed by a MIT style -# license that can be found in the LICENSE file. # shellcheck disable=SC2034 # Variables sourced in other scripts. # The server platform we are building on. -readonly IAM_SUPPORTED_SERVER_PLATFORMS=( +readonly OPENIM_SUPPORTED_SERVER_PLATFORMS=( linux/amd64 linux/arm64 ) # If we update this we should also update the set of platforms whose standard # library is precompiled for in build/build-image/cross/Dockerfile -readonly IAM_SUPPORTED_CLIENT_PLATFORMS=( +readonly OPENIM_SUPPORTED_CLIENT_PLATFORMS=( linux/amd64 linux/arm64 ) # The set of server targets that we are only building for Linux # If you update this list, please also update build/BUILD. -iam::golang::server_targets() { +openim::golang::server_targets() { local targets=( - iam-apiserver - iam-authz-server - iam-pump - iam-watcher + openim-apiserver + openim-authz-server + openim-pump + openim-watcher ) echo "${targets[@]}" } -IFS=" " read -ra IAM_SERVER_TARGETS <<< "$(iam::golang::server_targets)" -readonly IAM_SERVER_TARGETS -readonly IAM_SERVER_BINARIES=("${IAM_SERVER_TARGETS[@]##*/}") +IFS=" " read -ra OPENIM_SERVER_TARGETS <<< "$(openim::golang::server_targets)" +readonly OPENIM_SERVER_TARGETS +readonly OPENIM_SERVER_BINARIES=("${OPENIM_SERVER_TARGETS[@]##*/}") # The set of server targets we build docker images for -iam::golang::server_image_targets() { - # NOTE: this contains cmd targets for iam::build::get_docker_wrapped_binaries +openim::golang::server_image_targets() { + # NOTE: this contains cmd targets for openim::build::get_docker_wrapped_binaries local targets=( - cmd/iam-apiserver - cmd/iam-authz-server - cmd/iam-pump - cmd/iam-watcher + cmd/openim-apiserver + cmd/openim-authz-server + cmd/openim-pump + cmd/openim-watcher ) echo "${targets[@]}" } -IFS=" " read -ra IAM_SERVER_IMAGE_TARGETS <<< "$(iam::golang::server_image_targets)" -readonly IAM_SERVER_IMAGE_TARGETS -readonly IAM_SERVER_IMAGE_BINARIES=("${IAM_SERVER_IMAGE_TARGETS[@]##*/}") +IFS=" " read -ra OPENIM_SERVER_IMAGE_TARGETS <<< "$(openim::golang::server_image_targets)" +readonly OPENIM_SERVER_IMAGE_TARGETS +readonly OPENIM_SERVER_IMAGE_BINARIES=("${OPENIM_SERVER_IMAGE_TARGETS[@]##*/}") # ------------ # NOTE: All functions that return lists should use newlines. # bash functions can't return arrays, and spaces are tricky, so newline # separators are the preferred pattern. -# To transform a string of newline-separated items to an array, use iam::util::read-array: -# iam::util::read-array FOO < <(iam::golang::dups a b c a) +# To transform a string of newline-separated items to an array, use openim::util::read-array: +# openim::util::read-array FOO < <(openim::golang::dups a b c a) # # ALWAYS remember to quote your subshells. Not doing so will break in # bash 4.3, and potentially cause other issues. # ------------ # Returns a sorted newline-separated list containing only duplicated items. -iam::golang::dups() { +openim::golang::dups() { # We use printf to insert newlines, which are required by sort. printf "%s\n" "$@" | sort | uniq -d } # Returns a sorted newline-separated list with duplicated items removed. -iam::golang::dedup() { +openim::golang::dedup() { # We use printf to insert newlines, which are required by sort. printf "%s\n" "$@" | sort -u } -# Depends on values of user-facing IAM_BUILD_PLATFORMS, IAM_FASTBUILD, -# and IAM_BUILDER_OS. -# Configures IAM_SERVER_PLATFORMS and IAM_CLIENT_PLATFORMS, then sets them +# Depends on values of user-facing OPENIM_BUILD_PLATFORMS, OPENIM_FASTBUILD, +# and OPENIM_BUILDER_OS. +# Configures OPENIM_SERVER_PLATFORMS and OPENIM_CLIENT_PLATFORMS, then sets them # to readonly. # The configured vars will only contain platforms allowed by the -# IAM_SUPPORTED* vars at the top of this file. -declare -a IAM_SERVER_PLATFORMS -declare -a IAM_CLIENT_PLATFORMS -iam::golang::setup_platforms() { - if [[ -n "${IAM_BUILD_PLATFORMS:-}" ]]; then - # IAM_BUILD_PLATFORMS needs to be read into an array before the next +# OPENIM_SUPPORTED* vars at the top of this file. +declare -a OPENIM_SERVER_PLATFORMS +declare -a OPENIM_CLIENT_PLATFORMS +openim::golang::setup_platforms() { + if [[ -n "${OPENIM_BUILD_PLATFORMS:-}" ]]; then + # OPENIM_BUILD_PLATFORMS needs to be read into an array before the next # step, or quoting treats it all as one element. local -a platforms - IFS=" " read -ra platforms <<< "${IAM_BUILD_PLATFORMS}" + IFS=" " read -ra platforms <<< "${OPENIM_BUILD_PLATFORMS}" - # Deduplicate to ensure the intersection trick with iam::golang::dups + # Deduplicate to ensure the intersection trick with openim::golang::dups # is not defeated by duplicates in user input. - iam::util::read-array platforms < <(iam::golang::dedup "${platforms[@]}") + openim::util::read-array platforms < <(openim::golang::dedup "${platforms[@]}") - # Use iam::golang::dups to restrict the builds to the platforms in - # IAM_SUPPORTED_*_PLATFORMS. Items should only appear at most once in each + # Use openim::golang::dups to restrict the builds to the platforms in + # OPENIM_SUPPORTED_*_PLATFORMS. Items should only appear at most once in each # set, so if they appear twice after the merge they are in the intersection. - iam::util::read-array IAM_SERVER_PLATFORMS < <(iam::golang::dups \ + openim::util::read-array OPENIM_SERVER_PLATFORMS < <(openim::golang::dups \ "${platforms[@]}" \ - "${IAM_SUPPORTED_SERVER_PLATFORMS[@]}" \ + "${OPENIM_SUPPORTED_SERVER_PLATFORMS[@]}" \ ) - readonly IAM_SERVER_PLATFORMS + readonly OPENIM_SERVER_PLATFORMS - iam::util::read-array IAM_CLIENT_PLATFORMS < <(iam::golang::dups \ + openim::util::read-array OPENIM_CLIENT_PLATFORMS < <(openim::golang::dups \ "${platforms[@]}" \ - "${IAM_SUPPORTED_CLIENT_PLATFORMS[@]}" \ + "${OPENIM_SUPPORTED_CLIENT_PLATFORMS[@]}" \ ) - readonly IAM_CLIENT_PLATFORMS + readonly OPENIM_CLIENT_PLATFORMS - elif [[ "${IAM_FASTBUILD:-}" == "true" ]]; then - IAM_SERVER_PLATFORMS=(linux/amd64) - readonly IAM_SERVER_PLATFORMS - IAM_CLIENT_PLATFORMS=(linux/amd64) - readonly IAM_CLIENT_PLATFORMS + elif [[ "${OPENIM_FASTBUILD:-}" == "true" ]]; then + OPENIM_SERVER_PLATFORMS=(linux/amd64) + readonly OPENIM_SERVER_PLATFORMS + OPENIM_CLIENT_PLATFORMS=(linux/amd64) + readonly OPENIM_CLIENT_PLATFORMS else - IAM_SERVER_PLATFORMS=("${IAM_SUPPORTED_SERVER_PLATFORMS[@]}") - readonly IAM_SERVER_PLATFORMS + OPENIM_SERVER_PLATFORMS=("${OPENIM_SUPPORTED_SERVER_PLATFORMS[@]}") + readonly OPENIM_SERVER_PLATFORMS - IAM_CLIENT_PLATFORMS=("${IAM_SUPPORTED_CLIENT_PLATFORMS[@]}") - readonly IAM_CLIENT_PLATFORMS + OPENIM_CLIENT_PLATFORMS=("${OPENIM_SUPPORTED_CLIENT_PLATFORMS[@]}") + readonly OPENIM_CLIENT_PLATFORMS fi } -iam::golang::setup_platforms +openim::golang::setup_platforms # The set of client targets that we are building for all platforms # If you update this list, please also update build/BUILD. -readonly IAM_CLIENT_TARGETS=( +readonly OPENIM_CLIENT_TARGETS=( iamctl ) -readonly IAM_CLIENT_BINARIES=("${IAM_CLIENT_TARGETS[@]##*/}") +readonly OPENIM_CLIENT_BINARIES=("${OPENIM_CLIENT_TARGETS[@]##*/}") -readonly IAM_ALL_TARGETS=( - "${IAM_SERVER_TARGETS[@]}" - "${IAM_CLIENT_TARGETS[@]}" +readonly OPENIM_ALL_TARGETS=( + "${OPENIM_SERVER_TARGETS[@]}" + "${OPENIM_CLIENT_TARGETS[@]}" ) -readonly IAM_ALL_BINARIES=("${IAM_ALL_TARGETS[@]##*/}") +readonly OPENIM_ALL_BINARIES=("${OPENIM_ALL_TARGETS[@]##*/}") # Asks golang what it thinks the host platform is. The go tool chain does some # slightly different things when the target platform matches the host platform. -iam::golang::host_platform() { +openim::golang::host_platform() { echo "$(go env GOHOSTOS)/$(go env GOHOSTARCH)" } # Ensure the go tool exists and is a viable version. -iam::golang::verify_go_version() { +openim::golang::verify_go_version() { if [[ -z "$(command -v go)" ]]; then - iam::log::usage_from_stdin <. All rights reserved. -# Use of this source code is governed by a MIT style -# license that can be found in the LICENSE file. set -o errexit set +o nounset @@ -16,13 +26,13 @@ unset CDPATH export GO111MODULE=on # The root of the build/dist directory -IAM_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd -P)" +OPENIM_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd -P)" -source "${IAM_ROOT}/scripts/lib/util.sh" -source "${IAM_ROOT}/scripts/lib/logging.sh" -source "${IAM_ROOT}/scripts/lib/color.sh" +source "${OPENIM_ROOT}/scripts/lib/util.sh" +source "${OPENIM_ROOT}/scripts/lib/logging.sh" +source "${OPENIM_ROOT}/scripts/lib/color.sh" -iam::log::install_errexit +openim::log::install_errexit -source "${IAM_ROOT}/scripts/lib/version.sh" -source "${IAM_ROOT}/scripts/lib/golang.sh" +source "${OPENIM_ROOT}/scripts/lib/version.sh" +source "${OPENIM_ROOT}/scripts/lib/golang.sh" diff --git a/scripts/lib/logging.sh b/scripts/lib/logging.sh index 39b805c11..092db5513 100755 --- a/scripts/lib/logging.sh +++ b/scripts/lib/logging.sh @@ -1,15 +1,25 @@ #!/usr/bin/env bash +# Copyright © 2023 OpenIM. 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. -# Copyright 2020 Lingfei Kong . All rights reserved. -# Use of this source code is governed by a MIT style -# license that can be found in the LICENSE file. # Controls verbosity of the script output and logging. -IAM_VERBOSE="${IAM_VERBOSE:-5}" +OPENIM_VERBOSE="${OPENIM_VERBOSE:-5}" # Handler for when we exit automatically on an error. # Borrowed from https://gist.github.com/ahendrix/7030300 -iam::log::errexit() { +openim::log::errexit() { local err="${PIPESTATUS[*]}" # If the shell we are in doesn't have errexit set (common in subshells) then @@ -21,19 +31,19 @@ iam::log::errexit() { # Print out the stack trace described by $function_stack if [ ${#FUNCNAME[@]} -gt 2 ] then - iam::log::error "Call tree:" + openim::log::error "Call tree:" for ((i=1;i<${#FUNCNAME[@]}-1;i++)) do - iam::log::error " ${i}: ${BASH_SOURCE[${i}+1]}:${BASH_LINENO[${i}]} ${FUNCNAME[${i}]}(...)" + openim::log::error " ${i}: ${BASH_SOURCE[${i}+1]}:${BASH_LINENO[${i}]} ${FUNCNAME[${i}]}(...)" done fi - iam::log::error_exit "Error in ${BASH_SOURCE[1]}:${BASH_LINENO[0]}. '${BASH_COMMAND}' exited with status ${err}" "${1:-1}" 1 + openim::log::error_exit "Error in ${BASH_SOURCE[1]}:${BASH_LINENO[0]}. '${BASH_COMMAND}' exited with status ${err}" "${1:-1}" 1 } -iam::log::install_errexit() { +openim::log::install_errexit() { # trap ERR to provide an error handler whenever a command exits nonzero this # is a more verbose version of set -o errexit - trap 'iam::log::errexit' ERR + trap 'openim::log::errexit' ERR # setting errtrace allows our ERR trap handler to be propagated to functions, # expansions and subshells @@ -44,7 +54,7 @@ iam::log::install_errexit() { # # Args: # $1 The number of stack frames to skip when printing. -iam::log::stack() { +openim::log::stack() { local stack_skip=${1:-0} stack_skip=$((stack_skip + 1)) if [[ ${#FUNCNAME[@]} -gt ${stack_skip} ]]; then @@ -66,13 +76,13 @@ iam::log::stack() { # $1 Message to log with the error # $2 The error code to return # $3 The number of stack frames to skip when printing. -iam::log::error_exit() { +openim::log::error_exit() { local message="${1:-}" local code="${2:-1}" local stack_skip="${3:-0}" stack_skip=$((stack_skip + 1)) - if [[ ${IAM_VERBOSE} -ge 4 ]]; then + if [[ ${OPENIM_VERBOSE} -ge 4 ]]; then local source_file=${BASH_SOURCE[${stack_skip}]} local source_line=${BASH_LINENO[$((stack_skip - 1))]} echo "!!! Error in ${source_file}:${source_line}" >&2 @@ -80,7 +90,7 @@ iam::log::error_exit() { echo " ${1}" >&2 } - iam::log::stack ${stack_skip} + openim::log::stack ${stack_skip} echo "Exiting with status ${code}" >&2 fi @@ -89,7 +99,7 @@ iam::log::error_exit() { } # Log an error but keep going. Don't dump the stack or exit. -iam::log::error() { +openim::log::error() { timestamp=$(date +"[%m%d %H:%M:%S]") echo "!!! ${timestamp} ${1-}" >&2 shift @@ -99,7 +109,7 @@ iam::log::error() { } # Print an usage message to stderr. The arguments are printed directly. -iam::log::usage() { +openim::log::usage() { echo >&2 local message for message; do @@ -108,19 +118,19 @@ iam::log::usage() { echo >&2 } -iam::log::usage_from_stdin() { +openim::log::usage_from_stdin() { local messages=() while read -r line; do messages+=("${line}") done - iam::log::usage "${messages[@]}" + openim::log::usage "${messages[@]}" } # Print out some info that isn't a top level status line -iam::log::info() { +openim::log::info() { local V="${V:-0}" - if [[ ${IAM_VERBOSE} < ${V} ]]; then + if [[ ${OPENIM_VERBOSE} < ${V} ]]; then return fi @@ -129,26 +139,26 @@ iam::log::info() { done } -# Just like iam::log::info, but no \n, so you can make a progress bar -iam::log::progress() { +# Just like openim::log::info, but no \n, so you can make a progress bar +openim::log::progress() { for message; do echo -e -n "${message}" done } -iam::log::info_from_stdin() { +openim::log::info_from_stdin() { local messages=() while read -r line; do messages+=("${line}") done - iam::log::info "${messages[@]}" + openim::log::info "${messages[@]}" } # Print a status line. Formatted to show up in a stream of output. -iam::log::status() { +openim::log::status() { local V="${V:-0}" - if [[ ${IAM_VERBOSE} < ${V} ]]; then + if [[ ${OPENIM_VERBOSE} < ${V} ]]; then return fi diff --git a/scripts/lib/release.sh b/scripts/lib/release.sh index acc3730ef..1817e4ff2 100755 --- a/scripts/lib/release.sh +++ b/scripts/lib/release.sh @@ -1,22 +1,33 @@ #!/usr/bin/env bash +# Copyright © 2023 OpenIM. 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. -# Copyright 2020 Lingfei Kong . All rights reserved. -# Use of this source code is governed by a MIT style -# license that can be found in the LICENSE file. - -# This file creates release artifacts (tar files, container images) that are -# ready to distribute to install or distribute to end users. ############################################################################### # Most of the ::release:: namespace functions have been moved to -# github.com/iam/release. Have a look in that repo and specifically in +# github.com/openim/release. Have a look in that repo and specifically in # lib/releaselib.sh for ::release::-related functionality. ############################################################################### +# example: ./coscli cp/sync -r /home/off-line/docker-off-line/ cos://openim-1306374445/openim/image/amd/off-line/off-line/ -e cos.ap-guangzhou.myqcloud.com +# https://cloud.tencent.com/document/product/436/71763 # Tencent cos configuration -readonly BUCKET="marmotedu-1254073058" +readonly BUCKET="openim-1306374445" readonly REGION="ap-beijing" -readonly COS_RELEASE_DIR="iam-release" +readonly COS_RELEASE_DIR="openim-release" + +# default cos command tool readonly COSTOOL="coscmd" # This is where the final release artifacts are created locally @@ -24,15 +35,15 @@ readonly RELEASE_STAGE="${LOCAL_OUTPUT_ROOT}/release-stage" readonly RELEASE_TARS="${LOCAL_OUTPUT_ROOT}/release-tars" readonly RELEASE_IMAGES="${LOCAL_OUTPUT_ROOT}/release-images" -# IAM github account info -readonly IAM_GITHUB_ORG=marmotedu -readonly IAM_GITHUB_REPO=iam +# OpenIM github account info +readonly OPENIM_GITHUB_ORG=OpenIMSDK +readonly OPENIM_GITHUB_REPO=openim -readonly ARTIFACT=iam.tar.gz +readonly ARTIFACT=openim.tar.gz readonly CHECKSUM=${ARTIFACT}.sha1sum -IAM_BUILD_CONFORMANCE=${IAM_BUILD_CONFORMANCE:-y} -IAM_BUILD_PULL_LATEST_IMAGES=${IAM_BUILD_PULL_LATEST_IMAGES:-y} +OPENIM_BUILD_CONFORMANCE=${OPENIM_BUILD_CONFORMANCE:-y} +OPENIM_BUILD_PULL_LATEST_IMAGES=${OPENIM_BUILD_PULL_LATEST_IMAGES:-y} # Validate a ci version # @@ -50,12 +61,12 @@ IAM_BUILD_PULL_LATEST_IMAGES=${IAM_BUILD_PULL_LATEST_IMAGES:-y} # VERSION_PRERELEASE_REV (e.g. '4') # VERSION_BUILD_INFO (e.g. '.56+abcdef12345678') # VERSION_COMMITS (e.g. '56') -function iam::release::parse_and_validate_ci_version() { +function openim::release::parse_and_validate_ci_version() { # Accept things like "v1.2.3-alpha.4.56+abcdef12345678" or "v1.2.3-beta.4" local -r version_regex="^v(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)-([a-zA-Z0-9]+)\\.(0|[1-9][0-9]*)(\\.(0|[1-9][0-9]*)\\+[0-9a-f]{7,40})?$" local -r version="${1-}" [[ "${version}" =~ ${version_regex} ]] || { - iam::log::error "Invalid ci version: '${version}', must match regex ${version_regex}" + openim::log::error "Invalid ci version: '${version}', must match regex ${version_regex}" return 1 } @@ -80,73 +91,73 @@ function iam::release::parse_and_validate_ci_version() { # --------------------------------------------------------------------------- # Build final release artifacts -function iam::release::clean_cruft() { +function openim::release::clean_cruft() { # Clean out cruft find "${RELEASE_STAGE}" -name '*~' -exec rm {} \; find "${RELEASE_STAGE}" -name '#*#' -exec rm {} \; find "${RELEASE_STAGE}" -name '.DS*' -exec rm {} \; } -function iam::release::package_tarballs() { +function openim::release::package_tarballs() { # Clean out any old releases rm -rf "${RELEASE_STAGE}" "${RELEASE_TARS}" "${RELEASE_IMAGES}" mkdir -p "${RELEASE_TARS}" - iam::release::package_src_tarball & - iam::release::package_client_tarballs & - iam::release::package_iam_manifests_tarball & - iam::release::package_server_tarballs & - iam::util::wait-for-jobs || { iam::log::error "previous tarball phase failed"; return 1; } - - iam::release::package_final_tarball & # _final depends on some of the previous phases - iam::util::wait-for-jobs || { iam::log::error "previous tarball phase failed"; return 1; } + openim::release::package_src_tarball & + openim::release::package_client_tarballs & + openim::release::package_iam_manifests_tarball & + openim::release::package_server_tarballs & + openim::util::wait-for-jobs || { openim::log::error "previous tarball phase failed"; return 1; } + + openim::release::package_final_tarball & # _final depends on some of the previous phases + openim::util::wait-for-jobs || { openim::log::error "previous tarball phase failed"; return 1; } } -function iam::release::updload_tarballs() { - iam::log::info "upload ${RELEASE_TARS}/* to cos bucket ${BUCKET}." +function openim::release::updload_tarballs() { + openim::log::info "upload ${RELEASE_TARS}/* to cos bucket ${BUCKET}." for file in $(ls ${RELEASE_TARS}/*) do if [ "${COSTOOL}" == "coscli" ];then - coscli cp "${file}" "cos://${BUCKET}/${COS_RELEASE_DIR}/${IAM_GIT_VERSION}/${file##*/}" + coscli cp "${file}" "cos://${BUCKET}/${COS_RELEASE_DIR}/${OPENIM_GIT_VERSION}/${file##*/}" coscli cp "${file}" "cos://${BUCKET}/${COS_RELEASE_DIR}/latest/${file##*/}" else - coscmd upload "${file}" "${COS_RELEASE_DIR}/${IAM_GIT_VERSION}/" + coscmd upload "${file}" "${COS_RELEASE_DIR}/${OPENIM_GIT_VERSION}/" coscmd upload "${file}" "${COS_RELEASE_DIR}/latest/" fi done } # Package the source code we built, for compliance/licensing/audit/yadda. -function iam::release::package_src_tarball() { - local -r src_tarball="${RELEASE_TARS}/iam-src.tar.gz" - iam::log::status "Building tarball: src" - if [[ "${IAM_GIT_TREE_STATE-}" = 'clean' ]]; then +function openim::release::package_src_tarball() { + local -r src_tarball="${RELEASE_TARS}/openim-src.tar.gz" + openim::log::status "Building tarball: src" + if [[ "${OPENIM_GIT_TREE_STATE-}" = 'clean' ]]; then git archive -o "${src_tarball}" HEAD else - find "${IAM_ROOT}" -mindepth 1 -maxdepth 1 \ + find "${OPENIM_ROOT}" -mindepth 1 -maxdepth 1 \ ! \( \ - \( -path "${IAM_ROOT}"/_\* -o \ - -path "${IAM_ROOT}"/.git\* -o \ - -path "${IAM_ROOT}"/.gitignore\* -o \ - -path "${IAM_ROOT}"/.gsemver.yaml\* -o \ - -path "${IAM_ROOT}"/.config\* -o \ - -path "${IAM_ROOT}"/.chglog\* -o \ - -path "${IAM_ROOT}"/.gitlint -o \ - -path "${IAM_ROOT}"/.golangci.yaml -o \ - -path "${IAM_ROOT}"/.goreleaser.yml -o \ - -path "${IAM_ROOT}"/.note.md -o \ - -path "${IAM_ROOT}"/.todo.md \ + \( -path "${OPENIM_ROOT}"/_\* -o \ + -path "${OPENIM_ROOT}"/.git\* -o \ + -path "${OPENIM_ROOT}"/.gitignore\* -o \ + -path "${OPENIM_ROOT}"/.gsemver.yaml\* -o \ + -path "${OPENIM_ROOT}"/.config\* -o \ + -path "${OPENIM_ROOT}"/.chglog\* -o \ + -path "${OPENIM_ROOT}"/.gitlint -o \ + -path "${OPENIM_ROOT}"/.golangci.yaml -o \ + -path "${OPENIM_ROOT}"/.goreleaser.yml -o \ + -path "${OPENIM_ROOT}"/.note.md -o \ + -path "${OPENIM_ROOT}"/.todo.md \ \) -prune \ \) -print0 \ - | "${TAR}" czf "${src_tarball}" --transform "s|${IAM_ROOT#/*}|iam|" --null -T - + | "${TAR}" czf "${src_tarball}" --transform "s|${OPENIM_ROOT#/*}|openim|" --null -T - fi } # Package up all of the server binaries -function iam::release::package_server_tarballs() { +function openim::release::package_server_tarballs() { # Find all of the built client binaries local long_platforms=("${LOCAL_OUTPUT_BINPATH}"/*/*) - if [[ -n ${IAM_BUILD_PLATFORMS-} ]]; then - read -ra long_platforms <<< "${IAM_BUILD_PLATFORMS}" + if [[ -n ${OPENIM_BUILD_PLATFORMS-} ]]; then + read -ra long_platforms <<< "${OPENIM_BUILD_PLATFORMS}" fi for platform_long in "${long_platforms[@]}"; do @@ -154,14 +165,14 @@ function iam::release::package_server_tarballs() { local platform_tag platform=${platform_long##${LOCAL_OUTPUT_BINPATH}/} # Strip LOCAL_OUTPUT_BINPATH platform_tag=${platform/\//-} # Replace a "/" for a "-" - iam::log::status "Starting tarball: server $platform_tag" + openim::log::status "Starting tarball: server $platform_tag" ( - local release_stage="${RELEASE_STAGE}/server/${platform_tag}/iam" + local release_stage="${RELEASE_STAGE}/server/${platform_tag}/openim" rm -rf "${release_stage}" mkdir -p "${release_stage}/server/bin" - local server_bins=("${IAM_SERVER_BINARIES[@]}") + local server_bins=("${OPENIM_SERVER_BINARIES[@]}") # This fancy expression will expand to prepend a path # (${LOCAL_OUTPUT_BINPATH}/${platform}/) to every item in the @@ -169,24 +180,24 @@ function iam::release::package_server_tarballs() { cp "${server_bins[@]/#/${LOCAL_OUTPUT_BINPATH}/${platform}/}" \ "${release_stage}/server/bin/" - iam::release::clean_cruft + openim::release::clean_cruft - local package_name="${RELEASE_TARS}/iam-server-${platform_tag}.tar.gz" - iam::release::create_tarball "${package_name}" "${release_stage}/.." + local package_name="${RELEASE_TARS}/openim-server-${platform_tag}.tar.gz" + openim::release::create_tarball "${package_name}" "${release_stage}/.." ) & done - iam::log::status "Waiting on tarballs" - iam::util::wait-for-jobs || { iam::log::error "server tarball creation failed"; exit 1; } + openim::log::status "Waiting on tarballs" + openim::util::wait-for-jobs || { openim::log::error "server tarball creation failed"; exit 1; } } # Package up all of the cross compiled clients. Over time this should grow into # a full SDK -function iam::release::package_client_tarballs() { +function openim::release::package_client_tarballs() { # Find all of the built client binaries local long_platforms=("${LOCAL_OUTPUT_BINPATH}"/*/*) - if [[ -n ${IAM_BUILD_PLATFORMS-} ]]; then - read -ra long_platforms <<< "${IAM_BUILD_PLATFORMS}" + if [[ -n ${OPENIM_BUILD_PLATFORMS-} ]]; then + read -ra long_platforms <<< "${OPENIM_BUILD_PLATFORMS}" fi for platform_long in "${long_platforms[@]}"; do @@ -194,14 +205,14 @@ function iam::release::package_client_tarballs() { local platform_tag platform=${platform_long##${LOCAL_OUTPUT_BINPATH}/} # Strip LOCAL_OUTPUT_BINPATH platform_tag=${platform/\//-} # Replace a "/" for a "-" - iam::log::status "Starting tarball: client $platform_tag" + openim::log::status "Starting tarball: client $platform_tag" ( - local release_stage="${RELEASE_STAGE}/client/${platform_tag}/iam" + local release_stage="${RELEASE_STAGE}/client/${platform_tag}/openim" rm -rf "${release_stage}" mkdir -p "${release_stage}/client/bin" - local client_bins=("${IAM_CLIENT_BINARIES[@]}") + local client_bins=("${OPENIM_CLIENT_BINARIES[@]}") # This fancy expression will expand to prepend a path # (${LOCAL_OUTPUT_BINPATH}/${platform}/) to every item in the @@ -209,45 +220,45 @@ function iam::release::package_client_tarballs() { cp "${client_bins[@]/#/${LOCAL_OUTPUT_BINPATH}/${platform}/}" \ "${release_stage}/client/bin/" - iam::release::clean_cruft + openim::release::clean_cruft - local package_name="${RELEASE_TARS}/iam-client-${platform_tag}.tar.gz" - iam::release::create_tarball "${package_name}" "${release_stage}/.." + local package_name="${RELEASE_TARS}/openim-client-${platform_tag}.tar.gz" + openim::release::create_tarball "${package_name}" "${release_stage}/.." ) & done - iam::log::status "Waiting on tarballs" - iam::util::wait-for-jobs || { iam::log::error "client tarball creation failed"; exit 1; } + openim::log::status "Waiting on tarballs" + openim::util::wait-for-jobs || { openim::log::error "client tarball creation failed"; exit 1; } } # Package up all of the server binaries in docker images -function iam::release::build_server_images() { +function openim::release::build_server_images() { # Clean out any old images rm -rf "${RELEASE_IMAGES}" local platform - for platform in "${IAM_SERVER_PLATFORMS[@]}"; do + for platform in "${OPENIM_SERVER_PLATFORMS[@]}"; do local platform_tag local arch platform_tag=${platform/\//-} # Replace a "/" for a "-" arch=$(basename "${platform}") - iam::log::status "Building images: $platform_tag" + openim::log::status "Building images: $platform_tag" local release_stage - release_stage="${RELEASE_STAGE}/server/${platform_tag}/iam" + release_stage="${RELEASE_STAGE}/server/${platform_tag}/openim" rm -rf "${release_stage}" mkdir -p "${release_stage}/server/bin" # This fancy expression will expand to prepend a path # (${LOCAL_OUTPUT_BINPATH}/${platform}/) to every item in the - # IAM_SERVER_IMAGE_BINARIES array. - cp "${IAM_SERVER_IMAGE_BINARIES[@]/#/${LOCAL_OUTPUT_BINPATH}/${platform}/}" \ + # OPENIM_SERVER_IMAGE_BINARIES array. + cp "${OPENIM_SERVER_IMAGE_BINARIES[@]/#/${LOCAL_OUTPUT_BINPATH}/${platform}/}" \ "${release_stage}/server/bin/" - iam::release::create_docker_images_for_server "${release_stage}/server/bin" "${arch}" + openim::release::create_docker_images_for_server "${release_stage}/server/bin" "${arch}" done } -function iam::release::md5() { +function openim::release::md5() { if which md5 >/dev/null 2>&1; then md5 -q "$1" else @@ -255,7 +266,7 @@ function iam::release::md5() { fi } -function iam::release::sha1() { +function openim::release::sha1() { if which sha1sum >/dev/null 2>&1; then sha1sum "$1" | awk '{ print $1 }' else @@ -263,12 +274,12 @@ function iam::release::sha1() { fi } -function iam::release::build_conformance_image() { +function openim::release::build_conformance_image() { local -r arch="$1" local -r registry="$2" local -r version="$3" local -r save_dir="${4-}" - iam::log::status "Building conformance image for arch: ${arch}" + openim::log::status "Building conformance image for arch: ${arch}" ARCH="${arch}" REGISTRY="${registry}" VERSION="${version}" \ make -C cluster/images/conformance/ build >/dev/null @@ -277,7 +288,7 @@ function iam::release::build_conformance_image() { if [[ -n "${save_dir}" ]]; then "${DOCKER[@]}" save "${conformance_tag}" > "${save_dir}/conformance-${arch}.tar" fi - iam::log::status "Deleting conformance image ${conformance_tag}" + openim::log::status "Deleting conformance image ${conformance_tag}" "${DOCKER[@]}" rmi "${conformance_tag}" &>/dev/null || true } @@ -285,7 +296,7 @@ function iam::release::build_conformance_image() { # Args: # $1 - binary_dir, the directory to save the tared images to. # $2 - arch, architecture for which we are building docker images. -function iam::release::create_docker_images_for_server() { +function openim::release::create_docker_images_for_server() { # Create a sub-shell so that we don't pollute the outer environment ( local binary_dir @@ -294,27 +305,27 @@ function iam::release::create_docker_images_for_server() { local images_dir binary_dir="$1" arch="$2" - binaries=$(iam::build::get_docker_wrapped_binaries "${arch}") + binaries=$(openim::build::get_docker_wrapped_binaries "${arch}") images_dir="${RELEASE_IMAGES}/${arch}" mkdir -p "${images_dir}" # k8s.gcr.io is the constant tag in the docker archives, this is also the default for config scripts in GKE. - # We can use IAM_DOCKER_REGISTRY to include and extra registry in the docker archive. - # If we use IAM_DOCKER_REGISTRY="k8s.gcr.io", then the extra tag (same) is ignored, see release_docker_image_tag below. + # We can use OPENIM_DOCKER_REGISTRY to include and extra registry in the docker archive. + # If we use OPENIM_DOCKER_REGISTRY="k8s.gcr.io", then the extra tag (same) is ignored, see release_docker_image_tag below. local -r docker_registry="k8s.gcr.io" # Docker tags cannot contain '+' - local docker_tag="${IAM_GIT_VERSION/+/_}" + local docker_tag="${OPENIM_GIT_VERSION/+/_}" if [[ -z "${docker_tag}" ]]; then - iam::log::error "git version information missing; cannot create Docker tag" + openim::log::error "git version information missing; cannot create Docker tag" return 1 fi - # provide `--pull` argument to `docker build` if `IAM_BUILD_PULL_LATEST_IMAGES` + # provide `--pull` argument to `docker build` if `OPENIM_BUILD_PULL_LATEST_IMAGES` # is set to y or Y; otherwise try to build the image without forcefully # pulling the latest base image. local docker_build_opts docker_build_opts= - if [[ "${IAM_BUILD_PULL_LATEST_IMAGES}" =~ [yY] ]]; then + if [[ "${OPENIM_BUILD_PULL_LATEST_IMAGES}" =~ [yY] ]]; then docker_build_opts='--pull' fi @@ -327,12 +338,12 @@ function iam::release::create_docker_images_for_server() { local docker_file_path="${docker_build_path}/Dockerfile" local docker_image_tag="${docker_registry}/${binary_name}-${arch}:${docker_tag}" - iam::log::status "Starting docker build for image: ${binary_name}-${arch}" + openim::log::status "Starting docker build for image: ${binary_name}-${arch}" ( rm -rf "${docker_build_path}" mkdir -p "${docker_build_path}" ln "${binary_file_path}" "${docker_build_path}/${binary_name}" - ln "${IAM_ROOT}/build/nsswitch.conf" "${docker_build_path}/nsswitch.conf" + ln "${OPENIM_ROOT}/build/nsswitch.conf" "${docker_build_path}/nsswitch.conf" chmod 0644 "${docker_build_path}/nsswitch.conf" cat < "${docker_file_path}" FROM ${base_image} @@ -346,9 +357,9 @@ EOF "${DOCKER[@]}" build ${docker_build_opts:+"${docker_build_opts}"} -q -t "${docker_image_tag}" "${docker_build_path}" >/dev/null # If we are building an official/alpha/beta release we want to keep # docker images and tag them appropriately. - local -r release_docker_image_tag="${IAM_DOCKER_REGISTRY-$docker_registry}/${binary_name}-${arch}:${IAM_DOCKER_IMAGE_TAG-$docker_tag}" + local -r release_docker_image_tag="${OPENIM_DOCKER_REGISTRY-$docker_registry}/${binary_name}-${arch}:${OPENIM_DOCKER_IMAGE_TAG-$docker_tag}" if [[ "${release_docker_image_tag}" != "${docker_image_tag}" ]]; then - iam::log::status "Tagging docker image ${docker_image_tag} as ${release_docker_image_tag}" + openim::log::status "Tagging docker image ${docker_image_tag} as ${release_docker_image_tag}" "${DOCKER[@]}" rmi "${release_docker_image_tag}" 2>/dev/null || true "${DOCKER[@]}" tag "${docker_image_tag}" "${release_docker_image_tag}" 2>/dev/null fi @@ -357,121 +368,121 @@ EOF rm -rf "${docker_build_path}" ln "${binary_file_path}.tar" "${images_dir}/" - iam::log::status "Deleting docker image ${docker_image_tag}" + openim::log::status "Deleting docker image ${docker_image_tag}" "${DOCKER[@]}" rmi "${docker_image_tag}" &>/dev/null || true ) & done - if [[ "${IAM_BUILD_CONFORMANCE}" =~ [yY] ]]; then - iam::release::build_conformance_image "${arch}" "${docker_registry}" \ + if [[ "${OPENIM_BUILD_CONFORMANCE}" =~ [yY] ]]; then + openim::release::build_conformance_image "${arch}" "${docker_registry}" \ "${docker_tag}" "${images_dir}" & fi - iam::util::wait-for-jobs || { iam::log::error "previous Docker build failed"; return 1; } - iam::log::status "Docker builds done" + openim::util::wait-for-jobs || { openim::log::error "previous Docker build failed"; return 1; } + openim::log::status "Docker builds done" ) } -# This will pack iam-system manifests files for distros such as COS. -function iam::release::package_iam_manifests_tarball() { - iam::log::status "Building tarball: manifests" +# This will pack openim-system manifests files for distros such as COS. +function openim::release::package_iam_manifests_tarball() { + openim::log::status "Building tarball: manifests" - local src_dir="${IAM_ROOT}/deployments" + local src_dir="${OPENIM_ROOT}/deployments" - local release_stage="${RELEASE_STAGE}/manifests/iam" + local release_stage="${RELEASE_STAGE}/manifests/openim" rm -rf "${release_stage}" local dst_dir="${release_stage}" mkdir -p "${dst_dir}" cp -r ${src_dir}/* "${dst_dir}" - #cp "${src_dir}/iam-apiserver.yaml" "${dst_dir}" - #cp "${src_dir}/iam-authz-server.yaml" "${dst_dir}" - #cp "${src_dir}/iam-pump.yaml" "${dst_dir}" - #cp "${src_dir}/iam-watcher.yaml" "${dst_dir}" - #cp "${IAM_ROOT}/cluster/gce/gci/health-monitor.sh" "${dst_dir}/health-monitor.sh" + #cp "${src_dir}/openim-apiserver.yaml" "${dst_dir}" + #cp "${src_dir}/openim-authz-server.yaml" "${dst_dir}" + #cp "${src_dir}/openim-pump.yaml" "${dst_dir}" + #cp "${src_dir}/openim-watcher.yaml" "${dst_dir}" + #cp "${OPENIM_ROOT}/cluster/gce/gci/health-monitor.sh" "${dst_dir}/health-monitor.sh" - iam::release::clean_cruft + openim::release::clean_cruft - local package_name="${RELEASE_TARS}/iam-manifests.tar.gz" - iam::release::create_tarball "${package_name}" "${release_stage}/.." + local package_name="${RELEASE_TARS}/openim-manifests.tar.gz" + openim::release::create_tarball "${package_name}" "${release_stage}/.." } -# This is all the platform-independent stuff you need to run/install iam. +# This is all the platform-independent stuff you need to run/install openim. # Arch-specific binaries will need to be downloaded separately (possibly by -# using the bundled cluster/get-iam-binaries.sh script). +# using the bundled cluster/get-openim-binaries.sh script). # Included in this tarball: # - Cluster spin up/down scripts and configs for various cloud providers # - Tarballs for manifest configs that are ready to be uploaded # - Examples (which may or may not still work) # - The remnants of the docs/ directory -function iam::release::package_final_tarball() { - iam::log::status "Building tarball: final" +function openim::release::package_final_tarball() { + openim::log::status "Building tarball: final" # This isn't a "full" tarball anymore, but the release lib still expects - # artifacts under "full/iam/" - local release_stage="${RELEASE_STAGE}/full/iam" + # artifacts under "full/openim/" + local release_stage="${RELEASE_STAGE}/full/openim" rm -rf "${release_stage}" mkdir -p "${release_stage}" mkdir -p "${release_stage}/client" cat < "${release_stage}/client/README" -Client binaries are no longer included in the IAM final tarball. +Client binaries are no longer included in the OpenIM final tarball. -Run release/get-iam-binaries.sh to download client and server binaries. +Run release/get-openim-binaries.sh to download client and server binaries. EOF # We want everything in /scripts. mkdir -p "${release_stage}/release" - cp -R "${IAM_ROOT}/scripts/release" "${release_stage}/" - cat < "${release_stage}/release/get-iam-binaries.sh" + cp -R "${OPENIM_ROOT}/scripts/release" "${release_stage}/" + cat < "${release_stage}/release/get-openim-binaries.sh" #!/usr/bin/env bash # Copyright 2020 Lingfei Kong . All rights reserved. # Use of this source code is governed by a MIT style # license that can be found in the LICENSE file. -# This file download iam client and server binaries from tencent cos bucket. +# This file download openim client and server binaries from tencent cos bucket. -os=linux arch=amd64 version=${IAM_GIT_VERSION} && wget https://${BUCKET}.cos.${REGION}.myqcloud.com/${COS_RELEASE_DIR}/\$version/{iam-client-\$os-\$arch.tar.gz,iam-server-\$os-\$arch.tar.gz} +os=linux arch=amd64 version=${OPENIM_GIT_VERSION} && wget https://${BUCKET}.cos.${REGION}.myqcloud.com/${COS_RELEASE_DIR}/\$version/{openim-client-\$os-\$arch.tar.gz,openim-server-\$os-\$arch.tar.gz} EOF - chmod +x ${release_stage}/release/get-iam-binaries.sh + chmod +x ${release_stage}/release/get-openim-binaries.sh mkdir -p "${release_stage}/server" - cp "${RELEASE_TARS}/iam-manifests.tar.gz" "${release_stage}/server/" + cp "${RELEASE_TARS}/openim-manifests.tar.gz" "${release_stage}/server/" cat < "${release_stage}/server/README" -Server binary tarballs are no longer included in the IAM final tarball. +Server binary tarballs are no longer included in the OpenIM final tarball. -Run release/get-iam-binaries.sh to download client and server binaries. +Run release/get-openim-binaries.sh to download client and server binaries. EOF # Include hack/lib as a dependency for the cluster/ scripts #mkdir -p "${release_stage}/hack" - #cp -R "${IAM_ROOT}/hack/lib" "${release_stage}/hack/" + #cp -R "${OPENIM_ROOT}/hack/lib" "${release_stage}/hack/" - cp -R ${IAM_ROOT}/{docs,configs,scripts,deployments,init,README.md,LICENSE} "${release_stage}/" + cp -R ${OPENIM_ROOT}/{docs,configs,scripts,deployments,init,README.md,LICENSE} "${release_stage}/" - echo "${IAM_GIT_VERSION}" > "${release_stage}/version" + echo "${OPENIM_GIT_VERSION}" > "${release_stage}/version" - iam::release::clean_cruft + openim::release::clean_cruft local package_name="${RELEASE_TARS}/${ARTIFACT}" - iam::release::create_tarball "${package_name}" "${release_stage}/.." + openim::release::create_tarball "${package_name}" "${release_stage}/.." } # Build a release tarball. $1 is the output tar name. $2 is the base directory # of the files to be packaged. This assumes that ${2}/iamis what is # being packaged. -function iam::release::create_tarball() { - iam::build::ensure_tar +function openim::release::create_tarball() { + openim::build::ensure_tar local tarfile=$1 local stagingdir=$2 - "${TAR}" czf "${tarfile}" -C "${stagingdir}" iam --owner=0 --group=0 + "${TAR}" czf "${tarfile}" -C "${stagingdir}" openim --owner=0 --group=0 } -function iam::release::install_github_release(){ +function openim::release::install_github_release(){ GO111MODULE=on go install github.com/github-release/github-release@latest } @@ -480,46 +491,46 @@ function iam::release::install_github_release(){ # - gsemver # - git-chglog # - coscmd or coscli -function iam::release::verify_prereqs(){ +function openim::release::verify_prereqs(){ if [ -z "$(which github-release 2>/dev/null)" ]; then - iam::log::info "'github-release' tool not installed, try to install it." + openim::log::info "'github-release' tool not installed, try to install it." - if ! iam::release::install_github_release; then - iam::log::error "failed to install 'github-release'" + if ! openim::release::install_github_release; then + openim::log::error "failed to install 'github-release'" return 1 fi fi if [ -z "$(which git-chglog 2>/dev/null)" ]; then - iam::log::info "'git-chglog' tool not installed, try to install it." + openim::log::info "'git-chglog' tool not installed, try to install it." if ! go install github.com/git-chglog/git-chglog/cmd/git-chglog@latest &>/dev/null; then - iam::log::error "failed to install 'git-chglog'" + openim::log::error "failed to install 'git-chglog'" return 1 fi fi if [ -z "$(which gsemver 2>/dev/null)" ]; then - iam::log::info "'gsemver' tool not installed, try to install it." + openim::log::info "'gsemver' tool not installed, try to install it." if ! go install github.com/arnaud-deprez/gsemver@latest &>/dev/null; then - iam::log::error "failed to install 'gsemver'" + openim::log::error "failed to install 'gsemver'" return 1 fi fi if [ -z "$(which ${COSTOOL} 2>/dev/null)" ]; then - iam::log::info "${COSTOOL} tool not installed, try to install it." + openim::log::info "${COSTOOL} tool not installed, try to install it." - if ! make -C "${IAM_ROOT}" tools.install.${COSTOOL}; then - iam::log::error "failed to install ${COSTOOL}" + if ! make -C "${OPENIM_ROOT}" tools.install.${COSTOOL}; then + openim::log::error "failed to install ${COSTOOL}" return 1 fi fi if [ -z "${TENCENT_SECRET_ID}" -o -z "${TENCENT_SECRET_KEY}" ];then - iam::log::error "can not find env: TENCENT_SECRET_ID and TENCENT_SECRET_KEY" + openim::log::error "can not find env: TENCENT_SECRET_ID and TENCENT_SECRET_KEY" return 1 fi @@ -556,42 +567,41 @@ EOF # Create a github release with specified tarballs. # NOTICE: Must export 'GITHUB_TOKEN' env in the shell, details: # https://github.com/github-release/github-release -function iam::release::github_release() { +function openim::release::github_release() { # create a github release - iam::log::info "create a new github release with tag ${IAM_GIT_VERSION}" + openim::log::info "create a new github release with tag ${OPENIM_GIT_VERSION}" github-release release \ - --user ${IAM_GITHUB_ORG} \ - --repo ${IAM_GITHUB_REPO} \ - --tag ${IAM_GIT_VERSION} \ + --user ${OPENIM_GITHUB_ORG} \ + --repo ${OPENIM_GITHUB_REPO} \ + --tag ${OPENIM_GIT_VERSION} \ --description "" \ --pre-release - # update iam tarballs - iam::log::info "upload ${ARTIFACT} to release ${IAM_GIT_VERSION}" + # update openim tarballs + openim::log::info "upload ${ARTIFACT} to release ${OPENIM_GIT_VERSION}" github-release upload \ - --user ${IAM_GITHUB_ORG} \ - --repo ${IAM_GITHUB_REPO} \ - --tag ${IAM_GIT_VERSION} \ + --user ${OPENIM_GITHUB_ORG} \ + --repo ${OPENIM_GITHUB_REPO} \ + --tag ${OPENIM_GIT_VERSION} \ --name ${ARTIFACT} \ --file ${RELEASE_TARS}/${ARTIFACT} - iam::log::info "upload iam-src.tar.gz to release ${IAM_GIT_VERSION}" + openim::log::info "upload openim-src.tar.gz to release ${OPENIM_GIT_VERSION}" github-release upload \ - --user ${IAM_GITHUB_ORG} \ - --repo ${IAM_GITHUB_REPO} \ - --tag ${IAM_GIT_VERSION} \ - --name "iam-src.tar.gz" \ - --file ${RELEASE_TARS}/iam-src.tar.gz + --user ${OPENIM_GITHUB_ORG} \ + --repo ${OPENIM_GITHUB_REPO} \ + --tag ${OPENIM_GIT_VERSION} \ + --name "openim-src.tar.gz" \ + --file ${RELEASE_TARS}/openim-src.tar.gz } -function iam::release::generate_changelog() { - iam::log::info "generate CHANGELOG-${IAM_GIT_VERSION#v}.md and commit it" +function openim::release::generate_changelog() { + openim::log::info "generate CHANGELOG-${OPENIM_GIT_VERSION#v}.md and commit it" - git-chglog ${IAM_GIT_VERSION} > ${IAM_ROOT}/CHANGELOG/CHANGELOG-${IAM_GIT_VERSION#v}.md + git-chglog ${OPENIM_GIT_VERSION} > ${OPENIM_ROOT}/CHANGELOG/CHANGELOG-${OPENIM_GIT_VERSION#v}.md set +o errexit - git add ${IAM_ROOT}/CHANGELOG/CHANGELOG-${IAM_GIT_VERSION#v}.md - git commit -a -m "docs(changelog): add CHANGELOG-${IAM_GIT_VERSION#v}.md" + git add ${OPENIM_ROOT}/CHANGELOG/CHANGELOG-${OPENIM_GIT_VERSION#v}.md + git commit -a -m "docs(changelog): add CHANGELOG-${OPENIM_GIT_VERSION#v}.md" git push -f origin master # 最后将 CHANGELOG 也 push 上去 } - diff --git a/scripts/lib/util.sh b/scripts/lib/util.sh index 86c32a69e..2f32dac99 100755 --- a/scripts/lib/util.sh +++ b/scripts/lib/util.sh @@ -1,23 +1,33 @@ #!/usr/bin/env bash +# Copyright © 2023 OpenIM. 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. -# Copyright 2020 Lingfei Kong . All rights reserved. -# Use of this source code is governed by a MIT style -# license that can be found in the LICENSE file. -function iam::util::sourced_variable { +function openim::util::sourced_variable { # Call this function to tell shellcheck that a variable is supposed to # be used from other calling context. This helps quiet an "unused # variable" warning from shellcheck and also document your code. true } -iam::util::sortable_date() { +openim::util::sortable_date() { date "+%Y%m%d-%H%M%S" } # arguments: target, item1, item2, item3, ... # returns 0 if target is in the given items, 1 otherwise. -iam::util::array_contains() { +openim::util::array_contains() { local search="$1" local element shift @@ -29,7 +39,7 @@ iam::util::array_contains() { return 1 } -iam::util::wait_for_url() { +openim::util::wait_for_url() { local url=$1 local prefix=${2:-} local wait=${3:-1} @@ -37,7 +47,7 @@ iam::util::wait_for_url() { local maxtime=${5:-1} command -v curl >/dev/null || { - iam::log::usage "curl must be installed" + openim::log::usage "curl must be installed" exit 1 } @@ -45,19 +55,19 @@ iam::util::wait_for_url() { for i in $(seq 1 "${times}"); do local out if out=$(curl --max-time "${maxtime}" -gkfs "${url}" 2>/dev/null); then - iam::log::status "On try ${i}, ${prefix}: ${out}" + openim::log::status "On try ${i}, ${prefix}: ${out}" return 0 fi sleep "${wait}" done - iam::log::error "Timed out waiting for ${prefix} to answer at ${url}; tried ${times} waiting ${wait} between each" + openim::log::error "Timed out waiting for ${prefix} to answer at ${url}; tried ${times} waiting ${wait} between each" return 1 } -# Example: iam::util::wait_for_success 120 5 "iamctl get nodes|grep localhost" +# Example: openim::util::wait_for_success 120 5 "iamctl get nodes|grep localhost" # arguments: wait time, sleep time, shell command # returns 0 if the shell command get output, 1 otherwise. -iam::util::wait_for_success(){ +openim::util::wait_for_success(){ local wait_time="$1" local sleep_time="$2" local cmd="$3" @@ -72,9 +82,9 @@ iam::util::wait_for_success(){ return 1 } -# Example: iam::util::trap_add 'echo "in trap DEBUG"' DEBUG +# Example: openim::util::trap_add 'echo "in trap DEBUG"' DEBUG # See: http://stackoverflow.com/questions/3338030/multiple-bash-traps-for-the-same-signal -iam::util::trap_add() { +openim::util::trap_add() { local trap_add_cmd trap_add_cmd=$1 shift @@ -101,23 +111,23 @@ iam::util::trap_add() { done } -# Opposite of iam::util::ensure-temp-dir() -iam::util::cleanup-temp-dir() { - rm -rf "${IAM_TEMP}" +# Opposite of openim::util::ensure-temp-dir() +openim::util::cleanup-temp-dir() { + rm -rf "${OPENIM_TEMP}" } # Create a temp dir that'll be deleted at the end of this bash session. # # Vars set: -# IAM_TEMP -iam::util::ensure-temp-dir() { - if [[ -z ${IAM_TEMP-} ]]; then - IAM_TEMP=$(mktemp -d 2>/dev/null || mktemp -d -t iamrnetes.XXXXXX) - iam::util::trap_add iam::util::cleanup-temp-dir EXIT +# OPENIM_TEMP +openim::util::ensure-temp-dir() { + if [[ -z ${OPENIM_TEMP-} ]]; then + OPENIM_TEMP=$(mktemp -d 2>/dev/null || mktemp -d -t iamrnetes.XXXXXX) + openim::util::trap_add openim::util::cleanup-temp-dir EXIT fi } -iam::util::host_os() { +openim::util::host_os() { local host_os case "$(uname -s)" in Darwin) @@ -127,14 +137,14 @@ iam::util::host_os() { host_os=linux ;; *) - iam::log::error "Unsupported host OS. Must be Linux or Mac OS X." + openim::log::error "Unsupported host OS. Must be Linux or Mac OS X." exit 1 ;; esac echo "${host_os}" } -iam::util::host_arch() { +openim::util::host_arch() { local host_arch case "$(uname -m)" in x86_64*) @@ -165,7 +175,7 @@ iam::util::host_arch() { host_arch=ppc64le ;; *) - iam::log::error "Unsupported host arch. Must be x86_64, 386, arm, arm64, s390x or ppc64le." + openim::log::error "Unsupported host arch. Must be x86_64, 386, arm, arm64, s390x or ppc64le." exit 1 ;; esac @@ -175,20 +185,20 @@ iam::util::host_arch() { # This figures out the host platform without relying on golang. We need this as # we don't want a golang install to be a prerequisite to building yet we need # this info to figure out where the final binaries are placed. -iam::util::host_platform() { - echo "$(iam::util::host_os)/$(iam::util::host_arch)" +openim::util::host_platform() { + echo "$(openim::util::host_os)/$(openim::util::host_arch)" } # looks for $1 in well-known output locations for the platform ($2) -# $IAM_ROOT must be set -iam::util::find-binary-for-platform() { +# $OPENIM_ROOT must be set +openim::util::find-binary-for-platform() { local -r lookfor="$1" local -r platform="$2" local locations=( - "${IAM_ROOT}/_output/bin/${lookfor}" - "${IAM_ROOT}/_output/${platform}/${lookfor}" - "${IAM_ROOT}/_output/local/bin/${platform}/${lookfor}" - "${IAM_ROOT}/_output/platforms/${platform}/${lookfor}" + "${OPENIM_ROOT}/_output/bin/${lookfor}" + "${OPENIM_ROOT}/_output/${platform}/${lookfor}" + "${OPENIM_ROOT}/_output/local/bin/${platform}/${lookfor}" + "${OPENIM_ROOT}/_output/platforms/${platform}/${lookfor}" ) # List most recently-updated location. @@ -197,42 +207,42 @@ iam::util::find-binary-for-platform() { } # looks for $1 in well-known output locations for the host platform -# $IAM_ROOT must be set -iam::util::find-binary() { - iam::util::find-binary-for-platform "$1" "$(iam::util::host_platform)" +# $OPENIM_ROOT must be set +openim::util::find-binary() { + openim::util::find-binary-for-platform "$1" "$(openim::util::host_platform)" } # Run all known doc generators (today gendocs and genman for iamctl) # $1 is the directory to put those generated documents -iam::util::gen-docs() { +openim::util::gen-docs() { local dest="$1" # Find binary - gendocs=$(iam::util::find-binary "gendocs") - geniamdocs=$(iam::util::find-binary "geniamdocs") - genman=$(iam::util::find-binary "genman") - genyaml=$(iam::util::find-binary "genyaml") - genfeddocs=$(iam::util::find-binary "genfeddocs") + gendocs=$(openim::util::find-binary "gendocs") + geniamdocs=$(openim::util::find-binary "geniamdocs") + genman=$(openim::util::find-binary "genman") + genyaml=$(openim::util::find-binary "genyaml") + genfeddocs=$(openim::util::find-binary "genfeddocs") # TODO: If ${genfeddocs} is not used from anywhere (it isn't used at # least from k/k tree), remove it completely. - iam::util::sourced_variable "${genfeddocs}" + openim::util::sourced_variable "${genfeddocs}" mkdir -p "${dest}/docs/guide/en-US/cmd/iamctl/" "${gendocs}" "${dest}/docs/guide/en-US/cmd/iamctl/" mkdir -p "${dest}/docs/guide/en-US/cmd/" - "${geniamdocs}" "${dest}/docs/guide/en-US/cmd/" "iam-apiserver" - "${geniamdocs}" "${dest}/docs/guide/en-US/cmd/" "iam-authz-server" - "${geniamdocs}" "${dest}/docs/guide/en-US/cmd/" "iam-pump" - "${geniamdocs}" "${dest}/docs/guide/en-US/cmd/" "iam-watcher" + "${geniamdocs}" "${dest}/docs/guide/en-US/cmd/" "openim-apiserver" + "${geniamdocs}" "${dest}/docs/guide/en-US/cmd/" "openim-authz-server" + "${geniamdocs}" "${dest}/docs/guide/en-US/cmd/" "openim-pump" + "${geniamdocs}" "${dest}/docs/guide/en-US/cmd/" "openim-watcher" "${geniamdocs}" "${dest}/docs/guide/en-US/cmd/iamctl" "iamctl" mkdir -p "${dest}/docs/man/man1/" - "${genman}" "${dest}/docs/man/man1/" "iam-apiserver" - "${genman}" "${dest}/docs/man/man1/" "iam-authz-server" - "${genman}" "${dest}/docs/man/man1/" "iam-pump" - "${genman}" "${dest}/docs/man/man1/" "iam-watcher" + "${genman}" "${dest}/docs/man/man1/" "openim-apiserver" + "${genman}" "${dest}/docs/man/man1/" "openim-authz-server" + "${genman}" "${dest}/docs/man/man1/" "openim-pump" + "${genman}" "${dest}/docs/man/man1/" "openim-watcher" "${genman}" "${dest}/docs/man/man1/" "iamctl" mkdir -p "${dest}/docs/guide/en-US/yaml/iamctl/" @@ -245,14 +255,14 @@ iam::util::gen-docs() { popd > /dev/null || return 1 } -# Removes previously generated docs-- we don't want to check them in. $IAM_ROOT +# Removes previously generated docs-- we don't want to check them in. $OPENIM_ROOT # must be set. -iam::util::remove-gen-docs() { - if [ -e "${IAM_ROOT}/docs/.generated_docs" ]; then +openim::util::remove-gen-docs() { + if [ -e "${OPENIM_ROOT}/docs/.generated_docs" ]; then # remove all of the old docs; we don't want to check them in. while read -r file; do - rm "${IAM_ROOT}/${file}" 2>/dev/null || true - done <"${IAM_ROOT}/docs/.generated_docs" + rm "${OPENIM_ROOT}/${file}" 2>/dev/null || true + done <"${OPENIM_ROOT}/docs/.generated_docs" # The docs/.generated_docs file lists itself, so we don't need to explicitly # delete it. fi @@ -260,15 +270,15 @@ iam::util::remove-gen-docs() { # Returns the name of the upstream remote repository name for the local git # repo, e.g. "upstream" or "origin". -iam::util::git_upstream_remote_name() { +openim::util::git_upstream_remote_name() { git remote -v | grep fetch |\ - grep -E 'github.com[/:]marmotedu/iam|marmotedu.io/iam' |\ + grep -E 'github.com[/:]marmotedu/openim|marmotedu.io/openim' |\ head -n 1 | awk '{print $1}' } # Exits script if working directory is dirty. If it's run interactively in the terminal # the user can commit changes in a second terminal. This script will wait. -iam::util::ensure_clean_working_dir() { +openim::util::ensure_clean_working_dir() { while ! git diff HEAD --exit-code &>/dev/null; do echo -e "\nUnexpected dirty working directory:\n" if tty -s; then @@ -285,7 +295,7 @@ iam::util::ensure_clean_working_dir() { # Find the base commit using: # $PULL_BASE_SHA if set (from Prow) # current ref from the remote upstream branch -iam::util::base_ref() { +openim::util::base_ref() { local -r git_branch=$1 if [[ -n ${PULL_BASE_SHA:-} ]]; then @@ -293,7 +303,7 @@ iam::util::base_ref() { return fi - full_branch="$(iam::util::git_upstream_remote_name)/${git_branch}" + full_branch="$(openim::util::git_upstream_remote_name)/${git_branch}" # make sure the branch is valid, otherwise the check will pass erroneously. if ! git describe "${full_branch}" >/dev/null; then @@ -308,13 +318,13 @@ iam::util::base_ref() { # current branch and upstream branch named by $1. # Returns 1 (false) if there are no changes # 0 (true) if there are changes detected. -iam::util::has_changes() { +openim::util::has_changes() { local -r git_branch=$1 local -r pattern=$2 local -r not_pattern=${3:-totallyimpossiblepattern} local base_ref - base_ref=$(iam::util::base_ref "${git_branch}") + base_ref=$(openim::util::base_ref "${git_branch}") echo "Checking for '${pattern}' changes against '${base_ref}'" # notice this uses ... to find the first shared ancestor @@ -330,7 +340,7 @@ iam::util::has_changes() { return 1 } -iam::util::download_file() { +openim::util::download_file() { local -r url=$1 local -r destination_file=$2 @@ -352,7 +362,7 @@ iam::util::download_file() { # Test whether openssl is installed. # Sets: # OPENSSL_BIN: The path to the openssl binary to use -function iam::util::test_openssl_installed { +function openim::util::test_openssl_installed { if ! openssl version >& /dev/null; then echo "Failed to run openssl. Please ensure openssl is installed" exit 1 @@ -366,7 +376,7 @@ function iam::util::test_openssl_installed { # '"client auth"' # '"server auth"' # '"client auth","server auth"' -function iam::util::create_signing_certkey { +function openim::util::create_signing_certkey { local sudo=$1 local dest_dir=$2 local id=$3 @@ -380,7 +390,7 @@ EOF } # signs a client certificate: args are sudo, dest-dir, CA, filename (roughly), username, groups... -function iam::util::create_client_certkey { +function openim::util::create_client_certkey { local sudo=$1 local dest_dir=$2 local ca=$3 @@ -404,7 +414,7 @@ EOF } # signs a serving certificate: args are sudo, dest-dir, ca, filename (roughly), subject, hosts... -function iam::util::create_serving_certkey { +function openim::util::create_serving_certkey { local sudo=$1 local dest_dir=$2 local ca=$3 @@ -428,7 +438,7 @@ EOF } # creates a self-contained iamconfig: args are sudo, dest-dir, ca file, host, port, client id, token(optional) -function iam::util::write_client_iamconfig { +function openim::util::write_client_iamconfig { local sudo=$1 local dest_dir=$2 local ca_file=$3 @@ -461,14 +471,14 @@ EOF # flatten the iamconfig files to make them self contained username=$(whoami) ${sudo} /usr/bin/env bash -e < "/tmp/${client_id}.iamconfig" + $(openim::util::find-binary iamctl) --iamconfig="${dest_dir}/${client_id}.iamconfig" config view --minify --flatten > "/tmp/${client_id}.iamconfig" mv -f "/tmp/${client_id}.iamconfig" "${dest_dir}/${client_id}.iamconfig" chown ${username} "${dest_dir}/${client_id}.iamconfig" EOF } # Determines if docker can be run, failures may simply require that the user be added to the docker group. -function iam::util::ensure_docker_daemon_connectivity { +function openim::util::ensure_docker_daemon_connectivity { IFS=" " read -ra DOCKER <<< "${DOCKER_OPTS}" # Expand ${DOCKER[@]} only if it's not unset. This is to work around # Bash 3 issue with unbound variable. @@ -497,7 +507,7 @@ EOF # Wait for background jobs to finish. Return with # an error status if any of the jobs failed. -iam::util::wait-for-jobs() { +openim::util::wait-for-jobs() { local fail=0 local job for job in $(jobs -p); do @@ -506,12 +516,12 @@ iam::util::wait-for-jobs() { return ${fail} } -# iam::util::join +# openim::util::join # Concatenates the list elements with the delimiter passed as first parameter # -# Ex: iam::util::join , a b c +# Ex: openim::util::join , a b c # -> a,b,c -function iam::util::join { +function openim::util::join { local IFS="$1" shift echo "$*" @@ -527,7 +537,7 @@ function iam::util::join { # CFSSLJSON_BIN: The path of the installed cfssljson binary # CFSSLCERTINFO_BIN: The path of the installed cfssl-certinfo binary # -function iam::util::ensure-cfssl { +function openim::util::ensure-cfssl { if command -v cfssl &>/dev/null && command -v cfssljson &>/dev/null && command -v cfssl-certinfo &>/dev/null; then CFSSL_BIN=$(command -v cfssl) CFSSLJSON_BIN=$(command -v cfssljson) @@ -535,7 +545,7 @@ function iam::util::ensure-cfssl { return 0 fi - host_arch=$(iam::util::host_arch) + host_arch=$(openim::util::host_arch) if [[ "${host_arch}" != "amd64" ]]; then echo "Cannot download cfssl on non-amd64 hosts and cfssl does not appear to be installed." @@ -588,13 +598,13 @@ function iam::util::ensure-cfssl { popd > /dev/null || return 1 } -# iam::util::ensure-gnu-sed +# openim::util::ensure-gnu-sed # Determines which sed binary is gnu-sed on linux/darwin # # Sets: # SED: The name of the gnu-sed binary # -function iam::util::ensure-gnu-sed { +function openim::util::ensure-gnu-sed { # NOTE: the echo below is a workaround to ensure sed is executed before the grep. # see: https://github.com/iamrnetes/iamrnetes/issues/87251 sed_help="$(LANG=C sed --help 2>&1 || true)" @@ -603,16 +613,16 @@ function iam::util::ensure-gnu-sed { elif command -v gsed &>/dev/null; then SED="gsed" else - iam::log::error "Failed to find GNU sed as sed or gsed. If you are on Mac: brew install gnu-sed." >&2 + openim::log::error "Failed to find GNU sed as sed or gsed. If you are on Mac: brew install gnu-sed." >&2 return 1 fi - iam::util::sourced_variable "${SED}" + openim::util::sourced_variable "${SED}" } -# iam::util::check-file-in-alphabetical-order +# openim::util::check-file-in-alphabetical-order # Check that the file is in alphabetical order # -function iam::util::check-file-in-alphabetical-order { +function openim::util::check-file-in-alphabetical-order { local failure_file="$1" if ! diff -u "${failure_file}" <(LC_ALL=C sort "${failure_file}"); then { @@ -626,9 +636,9 @@ function iam::util::check-file-in-alphabetical-order { fi } -# iam::util::require-jq +# openim::util::require-jq # Checks whether jq is installed. -function iam::util::require-jq { +function openim::util::require-jq { if ! command -v jq &>/dev/null; then echo "jq not found. Please install." 1>&2 return 1 @@ -636,7 +646,7 @@ function iam::util::require-jq { } # outputs md5 hash of $1, works on macOS and Linux -function iam::util::md5() { +function openim::util::md5() { if which md5 >/dev/null 2>&1; then md5 -q "$1" else @@ -644,7 +654,7 @@ function iam::util::md5() { fi } -# iam::util::read-array +# openim::util::read-array # Reads in stdin and adds it line by line to the array provided. This can be # used instead of "mapfile -t", and is bash 3 compatible. # @@ -652,9 +662,9 @@ function iam::util::md5() { # $1 (name of array to create/modify) # # Example usage: -# iam::util::read-array files < <(ls -1) +# openim::util::read-array files < <(ls -1) # -function iam::util::read-array { +function openim::util::read-array { local i=0 unset -v "$1" while IFS= read -r "$1[i++]"; do :; done @@ -671,13 +681,13 @@ if [[ -z "${color_start-}" ]]; then declare -r color_cyan="${color_start}1;36m" declare -r color_norm="${color_start}0m" - iam::util::sourced_variable "${color_start}" - iam::util::sourced_variable "${color_red}" - iam::util::sourced_variable "${color_yellow}" - iam::util::sourced_variable "${color_green}" - iam::util::sourced_variable "${color_blue}" - iam::util::sourced_variable "${color_cyan}" - iam::util::sourced_variable "${color_norm}" + openim::util::sourced_variable "${color_start}" + openim::util::sourced_variable "${color_red}" + openim::util::sourced_variable "${color_yellow}" + openim::util::sourced_variable "${color_green}" + openim::util::sourced_variable "${color_blue}" + openim::util::sourced_variable "${color_cyan}" + openim::util::sourced_variable "${color_norm}" fi # ex: ts=2 sw=2 et filetype=sh diff --git a/scripts/lib/version.sh b/scripts/lib/version.sh index 0edeac114..2a59bf63a 100755 --- a/scripts/lib/version.sh +++ b/scripts/lib/version.sh @@ -1,29 +1,39 @@ #!/usr/bin/env bash +# Copyright © 2023 OpenIM. 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. -# Copyright 2020 Lingfei Kong . All rights reserved. -# Use of this source code is governed by a MIT style -# license that can be found in the LICENSE file. # ----------------------------------------------------------------------------- # Version management helpers. These functions help to set, save and load the # following variables: # -# IAM_GIT_COMMIT - The git commit id corresponding to this +# OPENIM_GIT_COMMIT - The git commit id corresponding to this # source code. -# IAM_GIT_TREE_STATE - "clean" indicates no changes since the git commit id +# OPENIM_GIT_TREE_STATE - "clean" indicates no changes since the git commit id # "dirty" indicates source code changes after the git commit id # "archive" indicates the tree was produced by 'git archive' -# IAM_GIT_VERSION - "vX.Y" used to indicate the last release version. -# IAM_GIT_MAJOR - The major part of the version -# IAM_GIT_MINOR - The minor component of the version +# OPENIM_GIT_VERSION - "vX.Y" used to indicate the last release version. +# OPENIM_GIT_MAJOR - The major part of the version +# OPENIM_GIT_MINOR - The minor component of the version # Grovels through git to set a set of env variables. # -# If IAM_GIT_VERSION_FILE, this function will load from that file instead of +# If OPENIM_GIT_VERSION_FILE, this function will load from that file instead of # querying git. -iam::version::get_version_vars() { - if [[ -n ${IAM_GIT_VERSION_FILE-} ]]; then - iam::version::load_version_vars "${IAM_GIT_VERSION_FILE}" +openim::version::get_version_vars() { + if [[ -n ${OPENIM_GIT_VERSION_FILE-} ]]; then + openim::version::load_version_vars "${OPENIM_GIT_VERSION_FILE}" return fi @@ -33,30 +43,30 @@ iam::version::get_version_vars() { # Disabled as we're not expanding these at runtime, but rather expecting # that another tool may have expanded these and rewritten the source (!) if [[ '$Format:%%$' == "%" ]]; then - IAM_GIT_COMMIT='$Format:%H$' - IAM_GIT_TREE_STATE="archive" + OPENIM_GIT_COMMIT='$Format:%H$' + OPENIM_GIT_TREE_STATE="archive" # When a 'git archive' is exported, the '$Format:%D$' below will look # something like 'HEAD -> release-1.8, tag: v1.8.3' where then 'tag: ' # can be extracted from it. if [[ '$Format:%D$' =~ tag:\ (v[^ ,]+) ]]; then - IAM_GIT_VERSION="${BASH_REMATCH[1]}" + OPENIM_GIT_VERSION="${BASH_REMATCH[1]}" fi fi - local git=(git --work-tree "${IAM_ROOT}") + local git=(git --work-tree "${OPENIM_ROOT}") - if [[ -n ${IAM_GIT_COMMIT-} ]] || IAM_GIT_COMMIT=$("${git[@]}" rev-parse "HEAD^{commit}" 2>/dev/null); then - if [[ -z ${IAM_GIT_TREE_STATE-} ]]; then + if [[ -n ${OPENIM_GIT_COMMIT-} ]] || OPENIM_GIT_COMMIT=$("${git[@]}" rev-parse "HEAD^{commit}" 2>/dev/null); then + if [[ -z ${OPENIM_GIT_TREE_STATE-} ]]; then # Check if the tree is dirty. default to dirty if git_status=$("${git[@]}" status --porcelain 2>/dev/null) && [[ -z ${git_status} ]]; then - IAM_GIT_TREE_STATE="clean" + OPENIM_GIT_TREE_STATE="clean" else - IAM_GIT_TREE_STATE="dirty" + OPENIM_GIT_TREE_STATE="dirty" fi fi # Use git describe to find the version based on tags. - if [[ -n ${IAM_GIT_VERSION-} ]] || IAM_GIT_VERSION=$("${git[@]}" describe --tags --always --match='v*' 2>/dev/null); then + if [[ -n ${OPENIM_GIT_VERSION-} ]] || OPENIM_GIT_VERSION=$("${git[@]}" describe --tags --always --match='v*' 2>/dev/null); then # This translates the "git describe" to an actual semver.org # compatible semantic version that looks something like this: # v1.1.0-alpha.0.6+84c76d1142ea4d @@ -67,22 +77,22 @@ iam::version::get_version_vars() { # These regexes are painful enough in sed... # We don't want to do them in pure shell, so disable SC2001 # shellcheck disable=SC2001 - DASHES_IN_VERSION=$(echo "${IAM_GIT_VERSION}" | sed "s/[^-]//g") + DASHES_IN_VERSION=$(echo "${OPENIM_GIT_VERSION}" | sed "s/[^-]//g") if [[ "${DASHES_IN_VERSION}" == "---" ]] ; then # shellcheck disable=SC2001 # We have distance to subversion (v1.1.0-subversion-1-gCommitHash) - IAM_GIT_VERSION=$(echo "${IAM_GIT_VERSION}" | sed "s/-\([0-9]\{1,\}\)-g\([0-9a-f]\{14\}\)$/.\1\+\2/") + OPENIM_GIT_VERSION=$(echo "${OPENIM_GIT_VERSION}" | sed "s/-\([0-9]\{1,\}\)-g\([0-9a-f]\{14\}\)$/.\1\+\2/") elif [[ "${DASHES_IN_VERSION}" == "--" ]] ; then # shellcheck disable=SC2001 # We have distance to base tag (v1.1.0-1-gCommitHash) - IAM_GIT_VERSION=$(echo "${IAM_GIT_VERSION}" | sed "s/-g\([0-9a-f]\{14\}\)$/+\1/") + OPENIM_GIT_VERSION=$(echo "${OPENIM_GIT_VERSION}" | sed "s/-g\([0-9a-f]\{14\}\)$/+\1/") fi - if [[ "${IAM_GIT_TREE_STATE}" == "dirty" ]]; then + if [[ "${OPENIM_GIT_TREE_STATE}" == "dirty" ]]; then # git describe --dirty only considers changes to existing files, but # that is problematic since new untracked .go files affect the build, # so use our idea of "dirty" from git status instead. # TODO? - #IAM_GIT_VERSION+="-dirty" + #OPENIM_GIT_VERSION+="-dirty" : fi @@ -90,17 +100,17 @@ iam::version::get_version_vars() { # Try to match the "git describe" output to a regex to try to extract # the "major" and "minor" versions and whether this is the exact tagged # version or whether the tree is between two tagged versions. - if [[ "${IAM_GIT_VERSION}" =~ ^v([0-9]+)\.([0-9]+)(\.[0-9]+)?([-].*)?([+].*)?$ ]]; then - IAM_GIT_MAJOR=${BASH_REMATCH[1]} - IAM_GIT_MINOR=${BASH_REMATCH[2]} + if [[ "${OPENIM_GIT_VERSION}" =~ ^v([0-9]+)\.([0-9]+)(\.[0-9]+)?([-].*)?([+].*)?$ ]]; then + OPENIM_GIT_MAJOR=${BASH_REMATCH[1]} + OPENIM_GIT_MINOR=${BASH_REMATCH[2]} if [[ -n "${BASH_REMATCH[4]}" ]]; then - IAM_GIT_MINOR+="+" + OPENIM_GIT_MINOR+="+" fi fi - # If IAM_GIT_VERSION is not a valid Semantic Version, then refuse to build. - if ! [[ "${IAM_GIT_VERSION}" =~ ^v([0-9]+)\.([0-9]+)(\.[0-9]+)?(-[0-9A-Za-z.-]+)?(\+[0-9A-Za-z.-]+)?$ ]]; then - echo "IAM_GIT_VERSION should be a valid Semantic Version. Current value: ${IAM_GIT_VERSION}" + # If OPENIM_GIT_VERSION is not a valid Semantic Version, then refuse to build. + if ! [[ "${OPENIM_GIT_VERSION}" =~ ^v([0-9]+)\.([0-9]+)(\.[0-9]+)?(-[0-9A-Za-z.-]+)?(\+[0-9A-Za-z.-]+)?$ ]]; then + echo "OPENIM_GIT_VERSION should be a valid Semantic Version. Current value: ${OPENIM_GIT_VERSION}" echo "Please see more details here: https://semver.org" exit 1 fi @@ -109,27 +119,27 @@ iam::version::get_version_vars() { } # Saves the environment flags to $1 -iam::version::save_version_vars() { +openim::version::save_version_vars() { local version_file=${1-} [[ -n ${version_file} ]] || { - echo "!!! Internal error. No file specified in iam::version::save_version_vars" + echo "!!! Internal error. No file specified in openim::version::save_version_vars" return 1 } cat <"${version_file}" -IAM_GIT_COMMIT='${IAM_GIT_COMMIT-}' -IAM_GIT_TREE_STATE='${IAM_GIT_TREE_STATE-}' -IAM_GIT_VERSION='${IAM_GIT_VERSION-}' -IAM_GIT_MAJOR='${IAM_GIT_MAJOR-}' -IAM_GIT_MINOR='${IAM_GIT_MINOR-}' +OPENIM_GIT_COMMIT='${OPENIM_GIT_COMMIT-}' +OPENIM_GIT_TREE_STATE='${OPENIM_GIT_TREE_STATE-}' +OPENIM_GIT_VERSION='${OPENIM_GIT_VERSION-}' +OPENIM_GIT_MAJOR='${OPENIM_GIT_MAJOR-}' +OPENIM_GIT_MINOR='${OPENIM_GIT_MINOR-}' EOF } # Loads up the version variables from file $1 -iam::version::load_version_vars() { +openim::version::load_version_vars() { local version_file=${1-} [[ -n ${version_file} ]] || { - echo "!!! Internal error. No file specified in iam::version::load_version_vars" + echo "!!! Internal error. No file specified in openim::version::load_version_vars" return 1 } diff --git a/scripts/make-rules/gen.mk b/scripts/make-rules/gen.mk index a0d44befa..8306c1756 100644 --- a/scripts/make-rules/gen.mk +++ b/scripts/make-rules/gen.mk @@ -31,7 +31,7 @@ gen.errcode: gen.errcode.code gen.errcode.doc .PHONY: gen.errcode.code gen.errcode.code: tools.verify.codegen - @echo "===========> Generating iam error code go source files" + @echo "===========> Generating openim error code go source files" @codegen -type=int ${ROOT_DIR}/internal/pkg/code .PHONY: gen.errcode.doc @@ -44,7 +44,7 @@ gen.errcode.doc: tools.verify.codegen gen.ca.%: $(eval CA := $(word 1,$(subst ., ,$*))) @echo "===========> Generating CA files for $(CA)" - @${ROOT_DIR}/scripts/gencerts.sh generate-iam-cert $(OUTPUT_DIR)/cert $(CA) + @${ROOT_DIR}/scripts/gencerts.sh generate-openim-cert $(OUTPUT_DIR)/cert $(CA) .PHONY: gen.ca gen.ca: $(addprefix gen.ca., $(CERTIFICATES)) diff --git a/scripts/make-rules/tools.mk b/scripts/make-rules/tools.mk index f91ef2231..c0e65ff94 100644 --- a/scripts/make-rules/tools.mk +++ b/scripts/make-rules/tools.mk @@ -189,7 +189,7 @@ install.protoc-gen-go: ## install.cfssl: Install cfssl, used to generate certificates .PHONY: install.cfssl install.cfssl: - @$(ROOT_DIR)/scripts/install/install.sh iam::install::install_cfssl + @$(ROOT_DIR)/scripts/install/install.sh openim::install::install_cfssl ## install.depth: Install depth, used to check dependency tree .PHONY: install.depth diff --git a/scripts/mongo-init.sh b/scripts/mongo-init.sh index 3d1faa60b..07d0e3d03 100755 --- a/scripts/mongo-init.sh +++ b/scripts/mongo-init.sh @@ -1,3 +1,17 @@ +# Copyright © 2023 OpenIM. 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. + mongo -- "$MONGO_INITDB_DATABASE" <