Struct crev_lib::local::Local[][src]

pub struct Local { /* fields omitted */ }
Expand description

Local config stored in ~/.config/crev

This managed IDs, local proof repository, etc.

Implementations

Where the config is stored

Where temporary files are stored

Fails if it doesn’t exist. See auto_create_or_open()

Fails if it already exists. See auto_create_or_open()

Load the database from disk, or create one if needed.

Load config, and return Id configured as the current one

Load config, and return Id configured as the current one

Calculate for_id that is used in a lot of operations

  • if id_str is given and parses correctly - convert to Id.
  • otherwise return current id

Load config, update which Id is the current one, and save.

Same as get_root_path()

Directory where yaml files for user identities are stored

Directory where git checkouts for user’s own proof repos are stored

This is separate from cache of other people’s proofs

Like user_proofs_path but checks if the dir exists

Returns public Ids which belong to the current user.

Path where git checkouts of other people’s proof repos are stored

Copy crate for review, neutralizing hidden or dangerous files

Save activity (in-progress review) to disk

Load activity (in-progress review) from disk

Just returns the config, doesn’t change anything

Writes the config to disk AND sets it as the current one

Id in the config

Id in the config

Just reads the yaml file, doesn’t change any state

Just reads the yaml file, doesn’t change any state

Just reads the yaml file, doesn’t change any state

Just reads the yaml file and unlocks it, doesn’t change any state

Just reads the yaml file and unlocks it, doesn’t change anything

Just reads the yaml file and unlocks it, doesn’t change anything

Asks for passphrase up to 5 times

Changes the repo URL for the ID. Adopts existing temporary/local repo if any. Previous remote URL is abandoned. For crev id set-url command.

Writes the Id to disk, doesn’t change any state

Git clone or init new remote Github crev-proof repo for the current user.

Saves to user_proofs_path, so it’s trusted as user’s own proof repo.

Inits repo in get_proofs_dir_path()

Dir unique to this URL, inside user_proofs_path()

Path where the proofs are stored under git repository.

This function derives path from current user’s URL

This function derives path from current user’s URL

Creates new unsigned trust proof object, not edited

Ensures the proof contains valid URLs for Ids where possible.

Currently ignores previous proofs

See trust.sign_by(ownid)

Fetch other people’s proof repostiory from a git URL, into the current database on disk

Fetch other people’s proof repostiory from a git URL, directly into the given db (and disk too)

Fetch only repos that weren’t fetched before

Fetch proof repo URLs of trusted Ids

Per-url directory in cache_remotes_path()

Fetch a git proof repository

Returns url where it was cloned/fetched

Adds the repo to the local proof repo cache.

Fetches and imports to the given db

Same as fetch_url_into, but with more stats

dir - where the proofs were downloaded to url - url from which it was fetched

Fetch and discover proof repos. Like fetch_all_ids_recursively, but adds https://github.com/dpc/crev-proofs and repos in cache that didn’t belong to any Ids.

Run arbitrary git command in get_proofs_dir_path()

set open_cmd in the config

Create a new proofdb, and populate it with local repo and cache content.

The path must be inside get_proofs_dir_path()

Add a commit to user’s proof repo

Prints read_current_locked_id

Generate a new identity in the local config.

It’s OK if the URL contains other identities. A new one will be added.

The callback should provide a passphrase

Set given Id as the current one

See read_locked_id

Parse LockedId’s YAML and write it to disk. See save_locked_id

Trait Implementations

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.