messagebroker

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2024 License: BSD-3-Clause Imports: 3 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EventsName = map[int]string{
	0: "UNWINDIA_MATCH_NEW",
	1: "UNWINDIA_MATCH_READY_A",
	2: "UNWINDIA_MATCH_READY_B",
	3: "UNWINDIA_MATCH_READY_ALL",
	4: "UNWINDIA_MATCH_SERVER_READY",
	5: "UNWINDIA_MATCH_RESULT_UPDATED",
	6: "UNWINDIA_MATCH_RESULT_FINISHED",
	7: "UNWINDIA_MATCH_FINISHED",
}
View Source
var MessageTypesName = map[int]string{
	0: "create",
	1: "update",
	2: "delete",
}
View Source
var PulsarAuthName = map[int]string{
	0: "simple",
	1: "token",
	2: "oauth2",
}

Functions

This section is empty.

Types

type MatchEvent

type MatchEvent int
const (
	UNWINDIA_MATCH_NEW MatchEvent = iota
	UNWINDIA_MATCH_READY_A
	UNWINDIA_MATCH_READY_B
	UNWINDIA_MATCH_READY_ALL
	UNWINDIA_MATCH_SERVER_READY
	UNWINDIA_MATCH_RESULT_UPDATED
	UNWINDIA_MATCH_RESULT_FINISHED
	UNWINDIA_MATCH_FINISHED
)

func (MatchEvent) String

func (e MatchEvent) String() string

func (*MatchEvent) UnmarshalJSON

func (e *MatchEvent) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals b into MatchEvent.

type MatchMessage

type MatchMessage struct {
	Message
	SubType MatchEvent `json:"subtype"`
	Data    *matchservice.MatchInfo
}

type Message

type Message struct {
	Type    MessageTypes `json:"type"`
	SubType string       `json:"subtype"`
	Data    interface{}  `json:"data,omitempty"`
}

type MessageTypes

type MessageTypes int
const (
	MessageTypeCreated MessageTypes = iota
	MessageTypeUpdated
	MessageTypeDeleted
)

func (MessageTypes) String

func (m MessageTypes) String() string

func (*MessageTypes) UnmarshalJSON

func (m *MessageTypes) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals b into MessageTypes.

type PulsarAuth

type PulsarAuth int
const (
	AUTH_SIMPLE PulsarAuth = iota
	AUTH_TOKEN
	AUTH_OAUTH2
)

func (PulsarAuth) String

func (p PulsarAuth) String() string

func (*PulsarAuth) Unmarshal

func (p *PulsarAuth) Unmarshal(data string) error

func (*PulsarAuth) UnmarshalJSON

func (p *PulsarAuth) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals b into PulsarAuth.

func (*PulsarAuth) UnmarshalText

func (p *PulsarAuth) UnmarshalText(text []byte) error

Jump to

Keyboard shortcuts

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