invite

package
v0.0.0-...-8027ee6 Latest Latest
Warning

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

Go to latest
Published: May 7, 2023 License: MIT Imports: 16 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidToken = errors.New("provided token is invalid: missing name or configs")

Functions

func Add

func Add(p *pool.Pool, i Invite) error

func Encode

func Encode(i Invite) (string, error)

Types

type Invite

type Invite struct {
	Subject      string            `json:"subject"`
	Sender       security.Identity `json:"sender"`
	RecipientIds []string          `json:"recipientIds"`
	Name         string            `json:"name"`
	Exchanges    []string          `json:"exchanges"`
}

func Decode

func Decode(self security.Identity, token string) (Invite, error)

func Receive

func Receive(p *pool.Pool, after int64, onlyMine bool) ([]Invite, error)

func (Invite) Join

func (i Invite) Join() error

type Token

type Token struct {
	Version    float32  `json:"v"`
	Subject    string   `json:"s"`
	SenderNick string   `json:"d"`
	Name       string   `json:"n"`
	Crc        uint32   `json:"c"`
	Keys       [][]byte `json:"k"`
	Storages   []byte   `json:"t"`
}

Jump to

Keyboard shortcuts

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