event

package
v0.0.25 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close()

func EventPublish

func EventPublish(channel string, data map[string]interface{})

func Publish

func Publish(clientId, channel string, data map[string]interface{}) error

func Stack

func Stack(channel string, f func(CreatedEvenMessage)) (err error)

func Subscribe

func Subscribe(channel string, f func(CreatedEvenMessage)) (err error)

Types

type Conn

type Conn struct {
	// contains filtered or unexported fields
}

func Load

func Load() (*Conn, error)

type CreatedEvenMessage

type CreatedEvenMessage struct {
	Created_at time.Time              `json:"created_at"`
	Id         string                 `json:"id"`
	ClientId   string                 `json:"client_id"`
	Channel    string                 `json:"channel"`
	Data       map[string]interface{} `json:"data"`
}

func (CreatedEvenMessage) ToString

func (m CreatedEvenMessage) ToString() string

func (CreatedEvenMessage) Type

func (m CreatedEvenMessage) Type() string

type Message

type Message interface {
	Type() string
}

Jump to

Keyboard shortcuts

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