Free as in Freedom: Codeberg.org. Create your repos!
Browse Source

Updated docs

tags/v0.2-1
Sebastian Huebner 3 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 @@
99 99
 </div> <!-- id="main" -->
100 100
 <div id="about">
101 101
 <i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
102
-<i style="float:right;">Last updated 2019-02-06 20:15:45 </i>
102
+<i style="float:right;">Last updated 2019-03-14 10:20:33 </i>
103 103
 </div> <!-- id="about" -->
104 104
 </div> <!-- id="container" -->
105 105
 </body>

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

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

+ 1
- 1
docs/index.html View File

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

+ 7
- 6
examples/demo.lua View File

@@ -1,3 +1,5 @@
1
+-- Start a new assessment and wait until it is finished
2
+
1 3
 -- setup path to find the project src files
2 4
 package.path = './src/?.lua;./src/?/init.lua;' .. package.path
3 5
 
@@ -9,11 +11,11 @@ end
9 11
 
10 12
 local opts = {
11 13
   host = 'edolas.world',
12
-  publish = false,
13
-  startNew = false
14
+  publish = true,
15
+  startNew = true
14 16
 }
15 17
 
18
+-- start new assessment for host 'edolas.world' and publish the result on the public board
16 19
 local resp, err, msg = ssll.analyze(opts)
17 20
 
18 21
 if err then print(msg) end
@@ -22,10 +24,9 @@ if err then print(msg) end
22 24
 if resp.status ~= 'READY' and resp.status ~= 'ERROR' then
23 25
   -- remove startNew option, to prevent assessment looping
24 26
   opts.startNew = false
25
-  
27
+
26 28
   -- check every 30s if assessment is ready or failed
27 29
   repeat
28
-    print(test)
29 30
     -- get progress displayed per endpoint during assessment
30 31
     for _, v in ipairs(resp.endpoints) do
31 32
       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
36 37
 end
37 38
 
38 39
 -- if failed, print the statusMessage
39
-if resp.status == 'ERROR' then 
40
+if resp.status == 'ERROR' then
40 41
   print(resp.statusMessage)
41 42
   os.exit(1)
42 43
 end
@@ -45,4 +46,3 @@ end
45 46
 for _, v in ipairs(resp.endpoints) do
46 47
   print(string.format('%s grade: %s', v.ipAddress, v.grade))
47 48
 end
48
- 

+ 21
- 0
examples/untitled.lua View File

@@ -0,0 +1,21 @@
1
+package.path = './src/?.lua;./src/?/init.lua;' .. package.path
2
+local ssll = require('ssllabs')
3
+local inspect = require('inspect')
4
+
5
+local opts = {
6
+  host = 'p.kokolor.es',
7
+  publish = true,
8
+  startNew = true
9
+}
10
+
11
+local resp, err, msg = ssll.get_root_certs_raw()
12
+if err then print(err, msg) end
13
+print(inspect(resp), resp.status)
14
+
15
+local Class = {}
16
+
17
+function Class:new(a)
18
+  return self
19
+end
20
+
21
+Class:new()

Loading…
Cancel
Save