envelope

package
v0.21.1 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2016 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

Package envelope defines the generic encapsulating format for torus objects.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Envelope

type Envelope interface {
	GetID() *identity.ID // avoid field collision
}

Envelope is the interface implemented by objects that encapsulate 'true' torus objects.

type Signed

type Signed struct {
	ID        *identity.ID        `json:"id"`
	Version   uint8               `json:"version"`
	Body      identity.Immutable  `json:"body"`
	Signature primitive.Signature `json:"sig"`
}

Signed is the generic format for encapsulating signed immutable request/response objects to/from torus.

func (*Signed) GetID

func (e *Signed) GetID() *identity.ID

GetID returns the ID of the object encapsulated in this envelope.

type Unsigned

type Unsigned struct {
	ID      *identity.ID     `json:"id"`
	Version uint8            `json:"version"`
	Body    identity.Mutable `json:"body"`
}

Unsigned is the generic format for encapsulating unsigned mutable request/response objects to/from torus.

func (*Unsigned) GetID

func (e *Unsigned) GetID() *identity.ID

GetID returns the ID of the object encapsulated in this envelope.

Jump to

Keyboard shortcuts

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