Documentation ¶
Index ¶
- func MakeAuth(challenge string) []byte
- func MakeClosed(id, reason string) []byte
- func MakeEOSE(sID string) []byte
- func MakeEvent(id string, e *event.Event) []byte
- func MakeNotice(msg string) []byte
- func MakeOK(ok bool, eid, reason string) []byte
- type Auth
- type Close
- type Closed
- type EOSE
- type Event
- type Message
- type Notice
- type OK
- type Req
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeClosed ¶
MakeClosed constructs a CLOSED message to be sent to client.
func MakeNotice ¶
Types ¶
type Auth ¶
Auth reperesents a NIP-01 AUTH message.
func (*Auth) DecodeFromJSON ¶
func (*Auth) EncodeToJSON ¶
type Close ¶
type Close string
Close reperesents a NIP-01 CLOSE message.
func (*Close) DecodeFromJSON ¶
func (Close) EncodeToJSON ¶
type Closed ¶
Closed reperesents a NIP-01 CLOSED message.
func (*Closed) DecodeFromJSON ¶
func (Closed) EncodeToJSON ¶
type EOSE ¶
type EOSE string
EOSE reperesents a NIP-01 EOSE message.
func (*EOSE) DecodeFromJSON ¶
func (EOSE) EncodeToJSON ¶
type Event ¶
Event represents a NIP-01 EVENT message.
func (*Event) DecodeFromJSON ¶
func (Event) EncodeToJSON ¶
type Message ¶
type Message interface { Type() string DecodeFromJSON([]byte) error EncodeToJSON() ([]byte, error) String() string }
Message reperesents an NIP-01 message which can be sent to or received by client.
func ParseMessage ¶
ParseMessage parses the given message from client to a message interface.
type Notice ¶
type Notice string
Notice reperesents a NIP-01 NOTICE message.
func (*Notice) DecodeFromJSON ¶
func (Notice) EncodeToJSON ¶
Click to show internal directories.
Click to hide internal directories.