Class: Lumberg::Cpanel::Gpg
- Defined in:
- lib/lumberg/cpanel/gpg.rb
Overview
Public: Allows users to create and manage GnuPG keys
Instance Attribute Summary
Attributes inherited from Base
Attributes inherited from Whm::Base
Instance Method Summary collapse
-
#count ⇒ Object
Public: Count the number of public GPG keys installed for a user.
-
#count_private ⇒ Object
Public: Count the number of private GPG keys installed for a user.
-
#list ⇒ Object
Public: List public GPG keys installed for the user.
-
#list_private ⇒ Object
Public: List GPG private (secret) keys associated with a user.
Methods inherited from Base
api_module, #initialize, #perform_request
Methods inherited from Whm::Base
Constructor Details
This class inherits a constructor from Lumberg::Cpanel::Base
Instance Method Details
#count ⇒ Object
Public: Count the number of public GPG keys installed for a user. You must have access to the ‘gpg’ feature to use this function.
Returns Hash API response
16 17 18 |
# File 'lib/lumberg/cpanel/gpg.rb', line 16 def count perform_request({ api_function: 'number_of_public_keys' }) end |
#count_private ⇒ Object
Public: Count the number of private GPG keys installed for a user
Returns Hash API response
30 31 32 |
# File 'lib/lumberg/cpanel/gpg.rb', line 30 def count_private perform_request({ api_function: 'number_of_private_keys' }) end |
#list ⇒ Object
Public: List public GPG keys installed for the user
Returns Hash API response
8 9 10 |
# File 'lib/lumberg/cpanel/gpg.rb', line 8 def list perform_request({ api_function: 'listgpgkeys' }) end |
#list_private ⇒ Object
Public: List GPG private (secret) keys associated with a user
Returns Hash API response
23 24 25 |
# File 'lib/lumberg/cpanel/gpg.rb', line 23 def list_private perform_request({ api_function: 'listsecretgpgkeys' }) end |