api

package module
v0.0.0-...-852fca6 Latest Latest
Warning

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

Go to latest
Published: May 16, 2021 License: MIT Imports: 1 Imported by: 5

Documentation

Index

Constants

View Source
const EventPubSub = "e"

EventPubSub is the pub/sub name for events.

Variables

This section is empty.

Functions

This section is empty.

Types

type Channel

type Channel struct {
	ID    keys.ID `json:"id" msgpack:"id"`
	Index int64   `json:"idx" msgpack:"idx"`
}

type Event

type Event struct {
	Type  EventType `json:"type" msgpack:"type"`
	Token string    `json:"token,omitempty" msgpack:"token,omitempty"`

	Channel *Channel `json:"channel,omitempty" msgpack:"channel,omitempty"`
	Vault   *Vault   `json:"vault,omitempty" msgpack:"vault,omitempty"`
}

Event to client. JSON is used for websocket clients.

type EventType

type EventType string
const (
	ChannelType  EventType = "channel"
	VaultType    EventType = "vault"
	ChannelsType EventType = "channels"
)

type Vault

type Vault struct {
	ID    keys.ID `json:"id" msgpack:"id"`
	Index int64   `json:"idx" msgpack:"idx"`
}

Jump to

Keyboard shortcuts

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