From 21a288d9270d6ec4fc9c3b4a98cd78d253425075 Mon Sep 17 00:00:00 2001 From: namhq1989 Date: Fri, 16 Dec 2022 10:47:20 +0700 Subject: [PATCH] add more stream --- constant.go | 28 ++++++++++++---------------- utils.go | 8 ++++---- 2 files changed, 16 insertions(+), 20 deletions(-) diff --git a/constant.go b/constant.go index 6787e5d..6c6ded1 100644 --- a/constant.go +++ b/constant.go @@ -1,9 +1,19 @@ package natsio var Stream = struct { - Selly string + Selly string + User string + HelpCenter string + Order string + Withdrawal string + Jobs string }{ - Selly: "selly", + Selly: "selly", + User: "user", + HelpCenter: "help_center", + Order: "order", + Withdrawal: "withdrawal", + Jobs: "jobs", } var SellyServer = struct { @@ -17,17 +27,3 @@ var SellyServer = struct { SMS: "sms", Chat: "chat", } - -var SellyService = struct { - User string - HelpCenter string - Order string - Withdrawal string - Jobs string -}{ - User: "user", - HelpCenter: "help_center", - Order: "order", - Withdrawal: "withdrawal", - Jobs: "jobs", -} diff --git a/utils.go b/utils.go index f04c363..e6930bf 100644 --- a/utils.go +++ b/utils.go @@ -21,13 +21,13 @@ func combineStreamAndSubjectName(stream, subject string) string { } // GenerateJetStreamSubject ... -func GenerateJetStreamSubject(stream, server, service, subject string) string { - return fmt.Sprintf("%s.jetstream.%s.%s.%s", stream, server, service, subject) +func GenerateJetStreamSubject(stream, server, subject string) string { + return fmt.Sprintf("%s.jetstream.%s.%s", stream, server, subject) } // GenerateReqrepSubject ... -func GenerateReqrepSubject(stream, server, service, subject string) string { - return fmt.Sprintf("%s.reqrep.%s.%s.%s", stream, server, service, subject) +func GenerateReqrepSubject(stream, server, subject string) string { + return fmt.Sprintf("%s.reqrep.%s.%s", stream, server, subject) } // InterfaceToBytes ...