add more stream
This commit is contained in:
parent
92b0b45ec7
commit
21a288d927
28
constant.go
28
constant.go
|
@ -1,9 +1,19 @@
|
||||||
package natsio
|
package natsio
|
||||||
|
|
||||||
var Stream = struct {
|
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 {
|
var SellyServer = struct {
|
||||||
|
@ -17,17 +27,3 @@ var SellyServer = struct {
|
||||||
SMS: "sms",
|
SMS: "sms",
|
||||||
Chat: "chat",
|
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",
|
|
||||||
}
|
|
||||||
|
|
8
utils.go
8
utils.go
|
@ -21,13 +21,13 @@ func combineStreamAndSubjectName(stream, subject string) string {
|
||||||
}
|
}
|
||||||
|
|
||||||
// GenerateJetStreamSubject ...
|
// GenerateJetStreamSubject ...
|
||||||
func GenerateJetStreamSubject(stream, server, service, subject string) string {
|
func GenerateJetStreamSubject(stream, server, subject string) string {
|
||||||
return fmt.Sprintf("%s.jetstream.%s.%s.%s", stream, server, service, subject)
|
return fmt.Sprintf("%s.jetstream.%s.%s", stream, server, subject)
|
||||||
}
|
}
|
||||||
|
|
||||||
// GenerateReqrepSubject ...
|
// GenerateReqrepSubject ...
|
||||||
func GenerateReqrepSubject(stream, server, service, subject string) string {
|
func GenerateReqrepSubject(stream, server, subject string) string {
|
||||||
return fmt.Sprintf("%s.reqrep.%s.%s.%s", stream, server, service, subject)
|
return fmt.Sprintf("%s.reqrep.%s.%s", stream, server, subject)
|
||||||
}
|
}
|
||||||
|
|
||||||
// InterfaceToBytes ...
|
// InterfaceToBytes ...
|
||||||
|
|
Loading…
Reference in New Issue