api

package module
v0.0.0-...-5a7537d Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2021 License: MIT Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const EventPubSub = "e"

EventPubSub is the pub/sub name for events.

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(b []byte, v interface{}, secretKey *[32]byte) error

Decrypt data into value (msgpack).

func Encrypt

func Encrypt(i interface{}, secretKey *[32]byte) ([]byte, error)

Encrypt value into data (msgpack).

Types

type Event

type Event struct {
	KID   keys.ID `json:"kid,omitempty" msgpack:"k,omitempty"`
	User  keys.ID `json:"user,omitempty" msgpack:"u,omitempty"`
	Index int64   `json:"idx,omitempty" msgpack:"i,omitempty"`
	Token string  `json:"token,omitempty" msgpack:"t,omitempty"`
}

Event to client. JSON is used for websocket clients.

Directories

Path Synopsis
api module
client module
server module

Jump to

Keyboard shortcuts

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