Class: Lumberg::Cpanel::Gpg

Inherits:
Base show all
Defined in:
lib/lumberg/cpanel/gpg.rb

Overview

Public: Allows users to create and manage GnuPG keys

Instance Attribute Summary

Attributes inherited from Base

#api_username

Attributes inherited from Whm::Base

#server

Instance Method Summary collapse

Methods inherited from Base

api_module, #initialize, #perform_request

Methods inherited from Whm::Base

#initialize, #setup_server

Constructor Details

This class inherits a constructor from Lumberg::Cpanel::Base

Instance Method Details

#countObject

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_privateObject

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

#listObject

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_privateObject

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