Browse Source

Updated docs

master
Sebastian 3 years ago
parent
commit
900346dd84
Signed by: imo GPG Key ID: AFA10CBFE4391C0C
  1. 2
      docs/examples/demo.lua.html
  2. 2
      docs/examples/demo_co.lua.html
  3. 2
      docs/index.html
  4. 14
      examples/demo.lua
  5. 21
      examples/untitled.lua

2
docs/examples/demo.lua.html

@ -99,7 +99,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2019-02-06 20:15:45 </i>
<i style="float:right;">Last updated 2019-03-14 10:20:33 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

2
docs/examples/demo_co.lua.html

@ -130,7 +130,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2019-02-06 20:15:45 </i>
<i style="float:right;">Last updated 2019-03-14 10:20:33 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

2
docs/index.html

@ -417,7 +417,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2019-02-06 20:15:45 </i>
<i style="float:right;">Last updated 2019-03-14 10:20:33 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

14
examples/demo.lua

@ -1,3 +1,5 @@
-- Start a new assessment and wait until it is finished
-- setup path to find the project src files
package.path = './src/?.lua;./src/?/init.lua;' .. package.path
@ -9,11 +11,11 @@ end
local opts = {
host = 'edolas.world',
publish = false,
startNew = false
publish = true,
startNew = true
}
-- start new assessment for host 'httpbin.com' and publish the result on the public board
-- start new assessment for host 'edolas.world' and publish the result on the public board
local resp, err, msg = ssll.analyze(opts)
if err then print(msg) end
@ -22,10 +24,9 @@ if err then print(msg) end
if resp.status ~= 'READY' and resp.status ~= 'ERROR' then
-- remove startNew option, to prevent assessment looping
opts.startNew = false
-- check every 30s if assessment is ready or failed
repeat
print(test)
-- get progress displayed per endpoint during assessment
for _, v in ipairs(resp.endpoints) do
print(string.format('%s progess: %d%%', v.ipAddress, v.progress or 0))
@ -36,7 +37,7 @@ if resp.status ~= 'READY' and resp.status ~= 'ERROR' then
end
-- if failed, print the statusMessage
if resp.status == 'ERROR' then
if resp.status == 'ERROR' then
print(resp.statusMessage)
os.exit(1)
end
@ -45,4 +46,3 @@ end
for _, v in ipairs(resp.endpoints) do
print(string.format('%s grade: %s', v.ipAddress, v.grade))
end

21
examples/untitled.lua

@ -0,0 +1,21 @@
package.path = './src/?.lua;./src/?/init.lua;' .. package.path
local ssll = require('ssllabs')
local inspect = require('inspect')
local opts = {
host = 'p.kokolor.es',
publish = true,
startNew = true
}
local resp, err, msg = ssll.get_root_certs_raw()
if err then print(err, msg) end
print(inspect(resp), resp.status)
local Class = {}
function Class:new(a)
return self
end
Class:new()
Loading…
Cancel
Save