Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement an operations manager #48

Open
sgreenbury opened this issue Nov 15, 2022 · 1 comment
Open

Implement an operations manager #48

sgreenbury opened this issue Nov 15, 2022 · 1 comment

Comments

@sgreenbury
Copy link
Collaborator

sgreenbury commented Nov 15, 2022

The process for constructing operations involves creating JSON files and sending them with POST requests to the ION server. Currently these are managed manually.

Similar to the KeyManager, an OperationManager trait would be of benefit.

For example:

trait OperationManager {
    /// Saves operation to operation store.
    fn save(&self, op: Operation, operation_type: OperationType) -> Result<(), OperationManagerError>;
    /// Reads operation from operation store.
    fn read(&self, operation_type: OperationType) -> Result<Operation, OperationManagerError>;
    /// Sends operation to ION server.
    fn publish(&self, operation_type: OperationType) -> Result<(), OperationManagerError>;
    /// Restores operation from backup.
    fn restore(&self, operation_type: OperationType) -> Result<(), OperationManagerError>;
}

enum OperationType {
    Create,
    Update,
    Deactivate,
    Recovery,
    Attest,
}

impl OperationManager for IONController { }

The identification of operations should be aligned with unique identifiers used for storage in ION's mongodb so that quick lookups can be performed to confirm publication events and also provide a unique index.

Two related issues are #14 and #33.

@thobson88
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants