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 ¶
- type Engine
- func (e *Engine) AppendCredential(ctx context.Context, notifier *observer.Notifier, ...) (*PlaintextCredentialEnvelope, error)
- func (e *Engine) ApproveInvite(ctx context.Context, notifier *observer.Notifier, InviteID *identity.ID) (*envelope.Unsigned, error)
- func (e *Engine) GenerateKeypair(ctx context.Context, notifier *observer.Notifier, OrgID *identity.ID) error
- func (e *Engine) RetrieveCredentials(ctx context.Context, notifier *observer.Notifier, cpath string) ([]PlaintextCredentialEnvelope, error)
- type PlaintextCredential
- type PlaintextCredentialEnvelope
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 ¶
func (e *Engine) AppendCredential(ctx context.Context, notifier *observer.Notifier, cred *PlaintextCredentialEnvelope) (*PlaintextCredentialEnvelope, error)
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