Struct digitalocean::api::SshKey
[−]
pub struct SshKey { /* fields omitted */ }
DigitalOcean allows you to add SSH public keys to the interface so that you can embed your public key into a Droplet at the time of creation. Only the public key is required to take advantage of this functionality.
Methods
impl SshKey
fn id(&self) -> &usize
This is a unique identification number for the key. This can be used to reference a specific SSH key when you wish to embed a key into a Droplet.
Note: This is a String
to allow for id
and fingerprint
to be
used in Get
, Update
, and Delete
calls like the API describes.
fn fingerprint(&self) -> &String
This attribute contains the fingerprint value that is generated from the public key. This is a unique identifier that will differentiate it from other keys using a format that SSH recognizes.
fn public_key(&self) -> &String
This attribute contains the entire public key string that was uploaded. This is what is embedded into the root user's authorized_keys file if you choose to include this SSH key during Droplet creation.
fn name(&self) -> &String
This is the human-readable display name for the given SSH key. This is used to easily identify the SSH keys when they are displayed.
impl SshKey
[src]
fn create<N>(name: N, public_key: N) -> SshKeyRequest<Create, SshKey> where
N: AsRef<str> + Serialize + Display,
N: AsRef<str> + Serialize + Display,
fn list() -> SshKeyRequest<List, Vec<SshKey>>
fn get<S>(id: S) -> SshKeyRequest<Get, SshKey> where
S: Serialize + Display,
S: Serialize + Display,
fn update<S>(id: S) -> SshKeyRequest<Update, SshKey> where
S: Serialize + Display,
S: Serialize + Display,
fn delete<S>(id: S) -> SshKeyRequest<Delete, ()> where
S: Serialize + Display,
S: Serialize + Display,
Trait Implementations
impl Debug for SshKey
[src]
impl Clone for SshKey
[src]
fn clone(&self) -> SshKey
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more