logic

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2016 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Overview

Package logic exposes the core logic engine used for working with keyrings, keys, claims, teams, memberships, orgs, and other primitive objects core to the cryptography architecture

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

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

Engine exposes methods for performing actions that will affect the keys, keyrings, keyring memberships, or credential objects.

All data passing in and out of the engine is unencrypted for the currently logged in user.

func NewEngine

func NewEngine(c *config.Config, s session.Session, db *db.DB, e *crypto.Engine,
	client *registry.Client) *Engine

NewEngine returns a new Engine

func (*Engine) AppendCredential

AppendCredential attempts to append a plain-text Credential object to the Credential Graph.

func (*Engine) ApproveInvite

func (e *Engine) ApproveInvite(ctx context.Context, notifier *observer.Notifier,
	InviteID *identity.ID) (*envelope.Unsigned, error)

ApproveInvite approves an invitation of a user into an organzation by encoding them into a Keyring.

func (*Engine) GenerateKeypair

func (e *Engine) GenerateKeypair(ctx context.Context, notifier *observer.Notifier,
	OrgID *identity.ID) error

GenerateKeypair creates a signing and encrypting keypair for the current user for the given organization.

func (*Engine) RetrieveCredentials

func (e *Engine) RetrieveCredentials(ctx context.Context,
	notifier *observer.Notifier, cpath string) ([]PlaintextCredentialEnvelope, error)

RetrieveCredentials returns all credentials for the given CPath string

type PlaintextCredential

type PlaintextCredential struct {
	Name      string           `json:"name"`
	OrgID     *identity.ID     `json:"org_id"`
	PathExp   *pathexp.PathExp `json:"pathexp"`
	ProjectID *identity.ID     `json:"project_id"`
	Value     string           `json:"value"`
}

PlaintextCredential is the body of an unencrypted Credential

type PlaintextCredentialEnvelope

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

PlaintextCredentialEnvelope is an unencrypted credential object

Jump to

Keyboard shortcuts

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