Help us shape the future of Go! Take the 2026 Go Developer Survey

ockam

package module
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

README

Ockam

Apache 2.0 License Apache 2.0 License GoDoc Discuss Ockam

Build and Run

The simplest way to build and run ockam code is:

./build && ./build install && ockam --version

This requires recent versions of Bash and Docker installed on your development machine.

You may also work within a Vagrant and Virtualbox environment, see details on that and other build tools in the Contributing Guide

Contributing to Ockam

Contributors

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Version

func Version() string

Version returns the current version of Ockam

Types

type Block

type Block interface {
	Height() string
	Hash() string
}

Block represents a block in the Ockam Blockchain

type Chain

type Chain interface {
	ID() string
	Sync() error
	LatestBlock() Block
	Register(Entity) (Claim, error)
	Submit(Claim) error
}

Chain represents a chain of blocks that is maintained by a network of nodes

type Claim

type Claim interface {
	ID() string
	Nonce() string

	Type() string
	SetType(string)

	Issuer() Entity
	SetIssuer(Entity)

	Subject() Entity
	SetSubject(Entity)

	Data() map[string]interface{}
	SetData(map[string]interface{})

	Signatures() []Signature
	AddSignature(Signature)

	json.Marshaler
}

Claim is

type Entity

type Entity interface {
	ID() *did.DID
	PublicKeys() []PublicKey
	Signers() []Signer
	Attributes() map[string]interface{}
}

Entity represents and Ockam entity

type Fields

type Fields map[string]interface{}

Fields is

type Logger

type Logger interface {
	Error(format string, v ...interface{})
	Warn(format string, v ...interface{})
	Notice(format string, v ...interface{})
	Info(format string, v ...interface{})
	Debug(format string, v ...interface{})
	WithFields(fields Fields) Logger
}

Logger is an interface for Logging.

type Node

type Node interface {
	Chain
	Peers() []Node
	Chain() Chain
}

Node represents a node connected to a network of other peer nodes

type NodeDiscoverer

type NodeDiscoverer interface {
	Discover() ([]Node, error)
}

NodeDiscoverer provides the means to discover other nodes on in a network

type PublicKey

type PublicKey interface {
	Label() string
	SetLabel(string)

	Owner() Entity
	SetOwner(Entity)

	Type() string
	Encoding() string
	Value() string

	DID() *did.DID
}

PublicKey is

type Signer

type Signer interface {
	PublicKey() PublicKey
	Sign(Claim) error
	SignatureType() string
}

Signer is

Directories

Path Synopsis
cmd
ockam command
key
Package node implements the ockam.Node interface
Package node implements the ockam.Node interface
remote/http
Package http implements ockam.Node interface to enable interaction with a remote node that can be commiunicated with over http.
Package http implements ockam.Node interface to enable interaction with a remote node that can be commiunicated with over http.
Package random is used to generate random bytes and strings.
Package random is used to generate random bytes and strings.
Package test provides utilities for writing tests.
Package test provides utilities for writing tests.

Jump to

Keyboard shortcuts

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