event

package
v0.0.0-...-259a6ac Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2018 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package event implements the event types returned by the API's event listener.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnectionStatusEvent

type ConnectionStatusEvent struct {
	// AccountID is the account identifier for the account associated with
	// the event.
	AccountID string

	// IsConnected is true iff the account is connected to the provider.
	IsConnected bool
}

ConnectionStatusEvent is the event sent when an account's connection status changes.

func (*ConnectionStatusEvent) String

func (e *ConnectionStatusEvent) String() string

String returns a string representation of the ConnectionStatusEvent.

type Event

type Event interface {
	// String returns a string representation of the Event.
	String() string
}

Event is the generic event sent over the event listener channel.

type MessageReceivedEvent

type MessageReceivedEvent struct {
	// AccountID is the account identifier for the account associated with
	// the event.
	AccountID string

	// Sender is the message sender's public key, if any.
	Sender *ecdh.PublicKey

	// MessageID is the local unique identifier for the message.
	MessageID []byte
}

MessageReceivedEvent is the event sent when a new message is received.

func (*MessageReceivedEvent) String

func (e *MessageReceivedEvent) String() string

String returns a string representation of the MessageReceivedEvent.

Jump to

Keyboard shortcuts

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