constellation

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2017 License: GPL-3.0, LGPL-3.0 Imports: 14 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

This section is empty.

Variables

This section is empty.

Functions

func RunNode

func RunNode(cfgPath, nodeSocketPath string) error

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(publicKeyPath string, nodeSocketPath string) (*Client, error)

func (*Client) ReceivePayload

func (c *Client) ReceivePayload(key []byte) ([]byte, error)

func (*Client) SendPayload

func (c *Client) SendPayload(pl []byte, b64From string, b64To []string) ([]byte, error)

type Config

type Config struct {
	Socket     string   `toml:"socket"`
	PublicKeys []string `toml:"publickeys"`

	// Deprecated
	SocketPath    string `toml:"socketPath"`
	PublicKeyPath string `toml:"publicKeyPath"`
}

func LoadConfig

func LoadConfig(configPath string) (*Config, error)

type Constellation

type Constellation struct {
	// contains filtered or unexported fields
}

func MaybeNew

func MaybeNew(configPath string) *Constellation

func MustNew

func MustNew(configPath string) *Constellation

func New

func New(configPath string) (*Constellation, error)

func (*Constellation) Receive

func (g *Constellation) Receive(data []byte) ([]byte, error)

func (*Constellation) Send

func (g *Constellation) Send(data []byte, from string, to []string) (out []byte, err error)

type ReceiveRequest

type ReceiveRequest struct {
	Key string `json:"key"`
	To  string `json:"to"`
}

type ReceiveResponse

type ReceiveResponse struct {
	Payload string `json:"payload"`
}

type SendRequest

type SendRequest struct {
	Payload string   `json:"payload"`
	From    string   `json:"from"`
	To      []string `json:"to"`
}

type SendResponse

type SendResponse struct {
	Key string `json:"key"`
}

Jump to

Keyboard shortcuts

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