constellation

package
v0.0.0-...-4501600 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2020 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrConstellationIsntInit = errors.New("Constellation not in use")
)

Functions

func UpCheck

func UpCheck(c *Client) error

Types

type Client

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

func NewClient

func NewClient(config *Config, grpc bool) (*Client, error)

func (*Client) ReceivePayload

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

func (*Client) ReceivePayloadGrpc

func (c *Client) ReceivePayloadGrpc(data []byte) ([]byte, interface{})

func (*Client) SendPayload

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

func (*Client) SendPayloadGrpc

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

func (*Client) SendSignedTx

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

func (*Client) SendSignedTxGrpc

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

func (*Client) StorePayload

func (c *Client) StorePayload(pl []byte) ([]byte, error)

func (*Client) StorePayloadGrpc

func (c *Client) StorePayloadGrpc(pl []byte) ([]byte, error)

type Config

type Config struct {
	Socket  string `toml:"socket"`
	WorkDir string `toml:"workdir"`
	BaseURL string `toml:"clienturl"`
	Grpc    bool   `toml:"grpc"`
	// Deprecated
	SocketPath string `toml:"socketPath"`
}

func LoadConfig

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

type Constellation

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

func MaybeNew

func MaybeNew(path string) *Constellation

func MustNew

func MustNew(path string) *Constellation

func New

func New(path 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)

func (*Constellation) SendSignedTx

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

func (*Constellation) StoreRaw

func (g *Constellation) StoreRaw(data []byte) (out []byte, err error)

Jump to

Keyboard shortcuts

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