Class: MrMurano::Keystore

Inherits:
ServiceConfig show all
Defined in:
lib/MrMurano/commands/keystore.rb

Instance Method Summary collapse

Methods inherited from ServiceConfig

#fetch, #list, #scid, #scid_for_name

Methods inherited from SolutionBase

#docmp, #dodiff, #download, #endPoint, #localitems, #locallist, #removelocal, #status, #syncdown, #synckey, #syncup, #toRemoteItem, #tolocalname, #tolocalpath

Methods included from Verbose

#debug, #verbose

Methods included from Http

#curldebug, #delete, #get, #http, #http_reset, #json_opts, #post, #postf, #put, #set_def_headers, #showHttpError, #token, #tryToPrettyJSON, #workit

Constructor Details

#initializeKeystore



4
5
6
7
# File 'lib/MrMurano/commands/keystore.rb', line 4

def initialize
  super
  @serviceName = 'keystore'
end

Instance Method Details

#command(key, cmd, args) ⇒ Object



31
32
33
# File 'lib/MrMurano/commands/keystore.rb', line 31

def command(key, cmd, args)
  post("/#{scid}/call/command", {:key=>key, :command=>cmd, :args=>args})
end

#delkey(key) ⇒ Object



27
28
29
# File 'lib/MrMurano/commands/keystore.rb', line 27

def delkey(key)
  post("/#{scid}/call/delete", { :key=>key})
end

#getkey(key) ⇒ Object



18
19
20
21
# File 'lib/MrMurano/commands/keystore.rb', line 18

def getkey(key)
  ret = post("/#{scid}/call/get", {:key=>key})
  ret[:value]
end

#keyinfoObject



9
10
11
# File 'lib/MrMurano/commands/keystore.rb', line 9

def keyinfo
  ret = get("/#{scid}/call/info")
end

#listkeysObject



13
14
15
16
# File 'lib/MrMurano/commands/keystore.rb', line 13

def listkeys
  ret = get("/#{scid}/call/list")
  ret[:keys]
end

#setkey(key, value) ⇒ Object



23
24
25
# File 'lib/MrMurano/commands/keystore.rb', line 23

def setkey(key, value)
  post("/#{scid}/call/set", { :key=>key, :value=>value })
end