Browse Source

Updated docs

tags/v0.2-1
Sebastian Huebner 6 months ago
parent
commit
900346dd84
Signed by: Sebastian Huebner <sebastian@hueb-ner.de> GPG Key ID: AFA10CBFE4391C0C
5 changed files with 31 additions and 9 deletions
  1. 1
    1
      docs/examples/demo.lua.html
  2. 1
    1
      docs/examples/demo_co.lua.html
  3. 1
    1
      docs/index.html
  4. 7
    6
      examples/demo.lua
  5. 21
    0
      examples/untitled.lua

+ 1
- 1
docs/examples/demo.lua.html View File

@@ -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>

+ 1
- 1
docs/examples/demo_co.lua.html View File

@@ -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>

+ 1
- 1
docs/index.html View File

@@ -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>

+ 7
- 6
examples/demo.lua View File

@@ -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 '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
- 0
examples/untitled.lua View File

@@ -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