Compare commits

..

No commits in common. "2c00022622bf4732cc6338fc78a147aed78e4c30" and "ff408fd3948bbecc6b15d386ae361849a0c61e6b" have entirely different histories.

4 changed files with 0 additions and 46 deletions

View File

@ -1,21 +0,0 @@
package client
import (
"git.selly.red/Selly-Modules/natsio"
"git.selly.red/Selly-Modules/natsio/model"
"git.selly.red/Selly-Modules/natsio/subject"
)
// Socket ...
type Socket struct{}
// GetSocket ...
func GetSocket() Socket {
return Socket{}
}
// EmitSocketEventDataReward ...
func (s Socket) EmitSocketEventDataReward(p model.PayloadEmitSocketEvent) error {
_, err := natsio.GetServer().Request(subject.Socket.EmitEventReward, toBytes(p))
return err
}

View File

@ -1,9 +0,0 @@
package model
// PayloadEmitSocketEvent ...
type PayloadEmitSocketEvent struct {
User string `json:"user"`
Message string `json:"message"`
Data string `json:"data"`
IsNotRemove bool `json:"isNotRemove"`
}

View File

@ -23,7 +23,6 @@ var prefixes = struct {
Affiliate string Affiliate string
Product string Product string
Queue string Queue string
Socket string
}{ }{
Communication: "communication", Communication: "communication",
Order: "order", Order: "order",
@ -47,5 +46,4 @@ var prefixes = struct {
Affiliate: "affiliate", Affiliate: "affiliate",
Product: "product", Product: "product",
Queue: "queue", Queue: "queue",
Socket: "socket",
} }

View File

@ -1,14 +0,0 @@
package subject
import "fmt"
func getSocketValue(val string) string {
return fmt.Sprintf("%s.%s", prefixes.Socket, val)
}
// Socket ...
var Socket = struct {
EmitEventReward string
}{
EmitEventReward: getSocketValue("emit_event_reward"),
}