Skip to content

Commit

Permalink
migrate wx_payment logic to grpc-gateway, remove useless logic in thi…
Browse files Browse the repository at this point in the history
…s repo
  • Loading branch information
sunjiayu committed Jun 22, 2024
1 parent 4d7ff8c commit 5af1c4f
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 103 deletions.
8 changes: 0 additions & 8 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,6 @@ http_archive(
urls = ["https://github.com/aliyun/aliyun-oss-cpp-sdk/archive/master.zip"],
)

http_archive(
name = "com_github_cpp_base64",
build_file = "//bazel:base64.BUILD",
sha256 = "0a7ada789a99c2664437f1db8c38b60fe5815cf82b75bea0f0c08933c1317828",
strip_prefix = "cpp-base64-2.rc.08",
urls = ["https://github.com/ReneNyffenegger/cpp-base64/archive/refs/tags/V2.rc.08.tar.gz"],
)

# http_archive(
# name = "com_github_baidu_babylon",
# sha256 = "626c30f7df34dee8b735d8cabd8779ceb1a9274fd73285ec850f522ad36aa7eb",
Expand Down
13 changes: 0 additions & 13 deletions bazel/base64.BUILD

This file was deleted.

1 change: 0 additions & 1 deletion src/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ cc_binary(
"//src/plugin:token",
"//src/service:auth",
"//src/service:ielts_ai",
"//src/service:wx_payment",
"@abseil-cpp//absl/flags:flag",
"@abseil-cpp//absl/flags:parse",
"@abseil-cpp//absl/log:flags",
Expand Down
5 changes: 0 additions & 5 deletions src/ielts_ai.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include "src/plugin/token.h"
#include "src/service/auth.h"
#include "src/service/ielts_ai.h"
#include "src/service/wx_payment.h"

ABSL_FLAG(uint16_t, port, 8123, "Server port for the service");
ABSL_FLAG(bool, offline_mode, false, "Whether enable ssl certification");
Expand Down Expand Up @@ -82,10 +81,6 @@ int32_t main(int32_t argc, char* argv[]) {
}
builder.RegisterService(&chat_service);

// wx_payment notify
wx_payment::NotifyServiceImpl notify_service;
builder.RegisterService(&notify_service);

std::unique_ptr<grpc::Server> server(builder.BuildAndStart());
LOG(INFO) << "Server listening on " << server_addr;

Expand Down
28 changes: 0 additions & 28 deletions src/service/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -47,31 +47,3 @@ cc_library(
"@com_github_pkusunjy_openai_server_proto//:chat_completion_cc_grpc",
],
)

cc_library(
name = "wx_payment",
srcs = [
"wx_payment.cpp",
],
hdrs = [
"wx_payment.h",
],
linkopts = [
"-lcrypto",
"-lssl",
],
deps = [
"//src/plugin:log_sink",
"@boost.scope_exit",
"@com_github_cpp_base64//:base64",
"@com_github_grpc_grpc//:grpc++",
"@com_github_grpc_grpc//:grpc++_reflection",
"@com_github_pkusunjy_openai_server_proto//:wx_payment_cc_grpc",
] + select({
"@platforms//os:macos": [
"@boringssl//:ssl",
"@boringssl//:crypto",
],
"//conditions:default": [],
}),
)
16 changes: 0 additions & 16 deletions src/service/wx_payment.cpp

This file was deleted.

32 changes: 0 additions & 32 deletions src/service/wx_payment.h

This file was deleted.

0 comments on commit 5af1c4f

Please sign in to comment.