nat

package
v0.0.0-...-16ed941 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 5, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ReferralEventName = "referral-notification"
	ReferralTitleKey  = "referral-notification"
	ReferralMessage   = "referral message from user profile"
)

Variables

This section is empty.

Functions

func CloseNats

func CloseNats()

func InitNats

func InitNats(config *conf.NatServer)

func PublishNewProfile

func PublishNewProfile(refCode, userId string)

Types

type Data

type Data struct {
	TitleKey string `json:"title_key,omitempty" bson:"title_key,omitempty"`
	Code     string `json:"code,omitempty" bson:"code,omitempty"`
	UserId   string `json:"user_id,omitempty" bson:"user_id,omitempty"`
	Message  string `json:"message,omitempty" bson:"message,omitempty"`
	Symbol   string `json:"symbol,omitempty" bson:"symbol,omitempty"`
	Amount   string `json:"amount,omitempty" bson:"amount,omitempty"`
	Tx       string `json:"tx,omitempty" bson:"tx,omitempty"`
}

func NewData

func NewData(code, userId string) Data

type Event

type Event struct {
	EventName string `json:"event_name,omitempty" bson:"event_name,omitempty"`
	UserId    string `json:"user_id,omitempty" bson:"user_id,omitempty"`
	Data      Data   `json:"data,omitempty" bson:"data,omitempty"`
}

func NewEvent

func NewEvent(refCode, userId string) Event

type NatServer

type NatServer struct {
	Url   string `json:"url,omitempty" bson:"url,omitempty"`
	Topic Topic  `json:"topic,omitempty" bson:"topic,omitempty"`
}
var (
	NatCfg NatServer
)

type Queue

type Queue []string

type Topic

type Topic struct {
	NewProfileTopic string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL