1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00

Merge branch 'master' into gcal-optional-multi

This commit is contained in:
Chris Cummer 2018-06-19 12:46:52 -07:00 committed by GitHub
commit a533b44d02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
128 changed files with 24659 additions and 974 deletions

View File

@ -14,216 +14,196 @@
"name": "Chris Cummer", "name": "Chris Cummer",
"avatar_url": "https://avatars0.githubusercontent.com/u/6413?v=4", "avatar_url": "https://avatars0.githubusercontent.com/u/6413?v=4",
"profile": "https://twitter.com/senorprogrammer", "profile": "https://twitter.com/senorprogrammer",
"contributions": [ "contributions": []
]
}, },
{ {
"login": "jeangovil", "login": "jeangovil",
"name": "Hossein Mehrabi", "name": "Hossein Mehrabi",
"avatar_url": "https://avatars1.githubusercontent.com/u/34973359?v=4", "avatar_url": "https://avatars1.githubusercontent.com/u/34973359?v=4",
"profile": "https://github.com/jeangovil", "profile": "https://github.com/jeangovil",
"contributions": [ "contributions": []
]
}, },
{ {
"login": "Fengyalv", "login": "Fengyalv",
"name": "FengYa", "name": "FengYa",
"avatar_url": "https://avatars0.githubusercontent.com/u/11779018?v=4", "avatar_url": "https://avatars0.githubusercontent.com/u/11779018?v=4",
"profile": "https://github.com/Fengyalv", "profile": "https://github.com/Fengyalv",
"contributions": [ "contributions": []
]
}, },
{ {
"login": "deltaxflux", "login": "deltaxflux",
"name": "deltax", "name": "deltax",
"avatar_url": "https://avatars2.githubusercontent.com/u/17337753?v=4", "avatar_url": "https://avatars2.githubusercontent.com/u/17337753?v=4",
"profile": "https://fluxionnetwork.github.io/fluxion/", "profile": "https://fluxionnetwork.github.io/fluxion/",
"contributions": [ "contributions": []
]
}, },
{ {
"login": "BillKeenan", "login": "BillKeenan",
"name": "Bill Keenan", "name": "Bill Keenan",
"avatar_url": "https://avatars0.githubusercontent.com/u/1319630?v=4", "avatar_url": "https://avatars0.githubusercontent.com/u/1319630?v=4",
"profile": "https://github.com/BillKeenan", "profile": "https://github.com/BillKeenan",
"contributions": [ "contributions": []
]
}, },
{ {
"login": "interlock", "login": "interlock",
"name": "June S", "name": "June S",
"avatar_url": "https://avatars2.githubusercontent.com/u/118081?v=4", "avatar_url": "https://avatars2.githubusercontent.com/u/118081?v=4",
"profile": "http://blog.sapara.com", "profile": "http://blog.sapara.com",
"contributions": [ "contributions": []
]
}, },
{ {
"login": "XanthusL", "login": "XanthusL",
"name": "liyiheng", "name": "liyiheng",
"avatar_url": "https://avatars3.githubusercontent.com/u/16461061?v=4", "avatar_url": "https://avatars3.githubusercontent.com/u/16461061?v=4",
"profile": "https://github.com/XanthusL", "profile": "https://github.com/XanthusL",
"contributions": [ "contributions": []
]
}, },
{ {
"login": "baustinanki", "login": "baustinanki",
"name": "baustinanki", "name": "baustinanki",
"avatar_url": "https://avatars2.githubusercontent.com/u/9014288?v=4", "avatar_url": "https://avatars2.githubusercontent.com/u/9014288?v=4",
"profile": "https://github.com/baustinanki", "profile": "https://github.com/baustinanki",
"contributions": [ "contributions": []
]
}, },
{ {
"login": "lixin9311", "login": "lixin9311",
"name": "lucus lee", "name": "lucus lee",
"avatar_url": "https://avatars0.githubusercontent.com/u/371475?v=4", "avatar_url": "https://avatars0.githubusercontent.com/u/371475?v=4",
"profile": "https://github.com/lixin9311", "profile": "https://github.com/lixin9311",
"contributions": [ "contributions": []
]
}, },
{ {
"login": "mxplusb", "login": "mxplusb",
"name": "Mike Lloyd", "name": "Mike Lloyd",
"avatar_url": "https://avatars1.githubusercontent.com/u/7537841?v=4", "avatar_url": "https://avatars1.githubusercontent.com/u/7537841?v=4",
"profile": "https://github.com/mxplusb", "profile": "https://github.com/mxplusb",
"contributions": [ "contributions": []
]
}, },
{ {
"login": "rubiojr", "login": "rubiojr",
"name": "Sergio Rubio", "name": "Sergio Rubio",
"avatar_url": "https://avatars3.githubusercontent.com/u/10998?v=4", "avatar_url": "https://avatars3.githubusercontent.com/u/10998?v=4",
"profile": "http://rubiojr.rbel.co", "profile": "http://rubiojr.rbel.co",
"contributions": [ "contributions": []
]
}, },
{ {
"login": "FarhadF", "login": "FarhadF",
"name": "Farhad Farahi", "name": "Farhad Farahi",
"avatar_url": "https://avatars3.githubusercontent.com/u/17374492?v=4", "avatar_url": "https://avatars3.githubusercontent.com/u/17374492?v=4",
"profile": "https://github.com/FarhadF", "profile": "https://github.com/FarhadF",
"contributions": [ "contributions": []
]
}, },
{ {
"login": "lasanthak", "login": "lasanthak",
"name": "Lasantha Kularatne", "name": "Lasantha Kularatne",
"avatar_url": "https://avatars1.githubusercontent.com/u/634604?v=4", "avatar_url": "https://avatars1.githubusercontent.com/u/634604?v=4",
"profile": "http://lasantha.blogspot.com/", "profile": "http://lasantha.blogspot.com/",
"contributions": [ "contributions": []
]
}, },
{ {
"login": "dlom", "login": "dlom",
"name": "Mark Old", "name": "Mark Old",
"avatar_url": "https://avatars1.githubusercontent.com/u/823331?v=4", "avatar_url": "https://avatars1.githubusercontent.com/u/823331?v=4",
"profile": "https://github.com/dlom", "profile": "https://github.com/dlom",
"contributions": [ "contributions": []
]
}, },
{ {
"login": "flw-cn", "login": "flw-cn",
"name": "flw", "name": "flw",
"avatar_url": "https://avatars0.githubusercontent.com/u/5546718?v=4", "avatar_url": "https://avatars0.githubusercontent.com/u/5546718?v=4",
"profile": "http://flw.tools/", "profile": "http://flw.tools/",
"contributions": [ "contributions": []
]
}, },
{ {
"login": "davebarda", "login": "davebarda",
"name": "David Barda", "name": "David Barda",
"avatar_url": "https://avatars0.githubusercontent.com/u/6024927?v=4", "avatar_url": "https://avatars0.githubusercontent.com/u/6024927?v=4",
"profile": "https://github.com/davebarda", "profile": "https://github.com/davebarda",
"contributions": [ "contributions": []
]
}, },
{ {
"login": "matrinox", "login": "matrinox",
"name": "Geoff Lee", "name": "Geoff Lee",
"avatar_url": "https://avatars2.githubusercontent.com/u/4261980?v=4", "avatar_url": "https://avatars2.githubusercontent.com/u/4261980?v=4",
"profile": "https://github.com/matrinox", "profile": "https://github.com/matrinox",
"contributions": [ "contributions": []
]
}, },
{ {
"login": "International", "login": "International",
"name": "George Opritescu", "name": "George Opritescu",
"avatar_url": "https://avatars3.githubusercontent.com/u/1022918?v=4", "avatar_url": "https://avatars3.githubusercontent.com/u/1022918?v=4",
"profile": "http://international.github.io", "profile": "http://international.github.io",
"contributions": [ "contributions": []
]
}, },
{ {
"login": "Grazfather", "login": "Grazfather",
"name": "Grazfather", "name": "Grazfather",
"avatar_url": "https://avatars3.githubusercontent.com/u/497310?v=4", "avatar_url": "https://avatars3.githubusercontent.com/u/497310?v=4",
"profile": "https://twitter.com/Grazfather", "profile": "https://twitter.com/Grazfather",
"contributions": [ "contributions": []
]
}, },
{ {
"login": "mcordell", "login": "mcordell",
"name": "Michael Cordell", "name": "Michael Cordell",
"avatar_url": "https://avatars2.githubusercontent.com/u/1691120?v=4", "avatar_url": "https://avatars2.githubusercontent.com/u/1691120?v=4",
"profile": "http://www.mikecordell.com/", "profile": "http://www.mikecordell.com/",
"contributions": [ "contributions": []
]
}, },
{ {
"login": "patrickelectric", "login": "patrickelectric",
"name": "Patrick José Pereira", "name": "Patrick José Pereira",
"avatar_url": "https://avatars2.githubusercontent.com/u/1215497?v=4", "avatar_url": "https://avatars2.githubusercontent.com/u/1215497?v=4",
"profile": "http://patrick.ibexcps.com", "profile": "http://patrick.ibexcps.com",
"contributions": [ "contributions": []
]
}, },
{ {
"login": "sherodtaylor", "login": "sherodtaylor",
"name": "sherod taylor", "name": "sherod taylor",
"avatar_url": "https://avatars2.githubusercontent.com/u/1483092?v=4", "avatar_url": "https://avatars2.githubusercontent.com/u/1483092?v=4",
"profile": "https://github.com/sherodtaylor", "profile": "https://github.com/sherodtaylor",
"contributions": [ "contributions": []
]
}, },
{ {
"login": "askl56", "login": "askl56",
"name": "Andrew Scott", "name": "Andrew Scott",
"avatar_url": "https://avatars2.githubusercontent.com/u/3062663?v=4", "avatar_url": "https://avatars2.githubusercontent.com/u/3062663?v=4",
"profile": "http://cogentia.io", "profile": "http://cogentia.io",
"contributions": [ "contributions": []
]
}, },
{ {
"login": "anandsudhir", "login": "anandsudhir",
"name": "Anand Sudhir Prayaga", "name": "Anand Sudhir Prayaga",
"avatar_url": "https://avatars2.githubusercontent.com/u/3252403?v=4", "avatar_url": "https://avatars2.githubusercontent.com/u/3252403?v=4",
"profile": "https://github.com/anandsudhir", "profile": "https://github.com/anandsudhir",
"contributions": [ "contributions": []
]
}, },
{ {
"login": "lsipii", "login": "lsipii",
"name": "Lassi Piironen", "name": "Lassi Piironen",
"avatar_url": "https://avatars1.githubusercontent.com/u/12018440?v=4", "avatar_url": "https://avatars1.githubusercontent.com/u/12018440?v=4",
"profile": "https://github.com/lsipii", "profile": "https://github.com/lsipii",
"contributions": [ "contributions": []
]
}, },
{ {
"login": "BlackWebWolf", "login": "BlackWebWolf",
"name": "BlackWebWolf", "name": "BlackWebWolf",
"avatar_url": "https://avatars0.githubusercontent.com/u/14799210?v=4", "avatar_url": "https://avatars0.githubusercontent.com/u/14799210?v=4",
"profile": "https://github.com/BlackWebWolf", "profile": "https://github.com/BlackWebWolf",
"contributions": [ "contributions": []
]
}, },
{ {
"login": "andrewzolotukhin", "login": "andrewzolotukhin",
"name": "andrewzolotukhin", "name": "andrewzolotukhin",
"avatar_url": "https://avatars0.githubusercontent.com/u/1894885?v=4", "avatar_url": "https://avatars0.githubusercontent.com/u/1894885?v=4",
"profile": "https://github.com/andrewzolotukhin", "profile": "https://github.com/andrewzolotukhin",
"contributions": [ "contributions": []
] },
{
"login": "retgits",
"name": "Leon Stigter",
"avatar_url": "https://avatars1.githubusercontent.com/u/8568280?v=4",
"profile": "https://retgits.github.io",
"contributions": []
} }
] ]
} }

35
Gopkg.lock generated
View File

@ -7,11 +7,17 @@
revision = "0fd7230b2a7505833d5f69b75cbd6c9582401479" revision = "0fd7230b2a7505833d5f69b75cbd6c9582401479"
version = "v0.23.0" version = "v0.23.0"
[[projects]]
branch = "master"
name = "github.com/adlio/trello"
packages = ["."]
revision = "05dcd358e32866f2353c4f49077346a0eb585436"
[[projects]] [[projects]]
branch = "master" branch = "master"
name = "github.com/briandowns/openweathermap" name = "github.com/briandowns/openweathermap"
packages = ["."] packages = ["."]
revision = "2adae1e5d10290d8cd435bd30296fc5e8f754862" revision = "6a9abf92e34f4de62ac671caee3143f10b98892d"
[[projects]] [[projects]]
branch = "master" branch = "master"
@ -44,7 +50,7 @@
branch = "master" branch = "master"
name = "github.com/google/go-github" name = "github.com/google/go-github"
packages = ["github"] packages = ["github"]
revision = "2ae5df7848328c214a48cec94c7d410cf8526527" revision = "a83ae98ad5d09188c49d6056edb60ec9bdf202bd"
[[projects]] [[projects]]
branch = "master" branch = "master"
@ -76,6 +82,12 @@
packages = ["."] packages = ["."]
revision = "9a10d05a33a8b9e828f20491e21e8927dec35f72" revision = "9a10d05a33a8b9e828f20491e21e8927dec35f72"
[[projects]]
name = "github.com/pkg/errors"
packages = ["."]
revision = "645ef00459ed84a119197bfb8d8205042c6df63d"
version = "v0.8.0"
[[projects]] [[projects]]
name = "github.com/radovskyb/watcher" name = "github.com/radovskyb/watcher"
packages = ["."] packages = ["."]
@ -86,13 +98,13 @@
branch = "master" branch = "master"
name = "github.com/rivo/tview" name = "github.com/rivo/tview"
packages = ["."] packages = ["."]
revision = "71ecf1f4299c6d72b16d20da72405b7e85ac8720" revision = "e643d10b365df4caec5ed32e4c1103e185af9079"
[[projects]] [[projects]]
branch = "master" branch = "master"
name = "github.com/xanzy/go-gitlab" name = "github.com/xanzy/go-gitlab"
packages = ["."] packages = ["."]
revision = "73e9df58a3194b1256edae4d2e819603f06d428c" revision = "1c1cfedc5a8ffe122b1981e8b0822fe22f461643"
[[projects]] [[projects]]
branch = "master" branch = "master"
@ -107,7 +119,7 @@
"context", "context",
"context/ctxhttp" "context/ctxhttp"
] ]
revision = "1e491301e022f8f977054da4c2d852decd59571f" revision = "db08ff08e8622530d9ed3a0e8ac279f6d4c02196"
[[projects]] [[projects]]
branch = "master" branch = "master"
@ -119,7 +131,7 @@
"jws", "jws",
"jwt" "jwt"
] ]
revision = "1e0a3fa8ba9a5c9eb35c271780101fdaf1b205d7" revision = "113ce6928c4638e14fd5eba69b9e6ec899d5dd83"
[[projects]] [[projects]]
name = "golang.org/x/text" name = "golang.org/x/text"
@ -140,9 +152,10 @@
"calendar/v3", "calendar/v3",
"gensupport", "gensupport",
"googleapi", "googleapi",
"googleapi/internal/uritemplates" "googleapi/internal/uritemplates",
"sheets/v4"
] ]
revision = "00e3bb8d04691e25ee2fccf98c866bcb7925c3ec" revision = "2eea9ba0a3d94f6ab46508083e299a00bbbc65f6"
[[projects]] [[projects]]
name = "google.golang.org/appengine" name = "google.golang.org/appengine"
@ -158,8 +171,8 @@
"internal/urlfetch", "internal/urlfetch",
"urlfetch" "urlfetch"
] ]
revision = "150dc57a1b433e64154302bdc40b6bb8aefa313a" revision = "b1f26356af11148e710935ed1ac8a7f5702c7612"
version = "v1.0.0" version = "v1.1.0"
[[projects]] [[projects]]
name = "gopkg.in/yaml.v2" name = "gopkg.in/yaml.v2"
@ -170,6 +183,6 @@
[solve-meta] [solve-meta]
analyzer-name = "dep" analyzer-name = "dep"
analyzer-version = 1 analyzer-version = 1
inputs-digest = "fd122eb7175ffd7db7cb197de13e0b850231ec9269a63a8ca9d117a8aa50d7e5" inputs-digest = "05d3df164ca80efbb1d5cf00a06e7ffde102690f0fabafb7d4e9860e461832db"
solver-name = "gps-cdcl" solver-name = "gps-cdcl"
solver-version = 1 solver-version = 1

View File

@ -77,6 +77,10 @@
name = "gopkg.in/yaml.v2" name = "gopkg.in/yaml.v2"
version = "2.2.1" version = "2.2.1"
[[constraint]]
branch = "master"
name = "github.com/adlio/trello"
[prune] [prune]
go-tests = true go-tests = true
unused-packages = true unused-packages = true

View File

@ -47,7 +47,7 @@ Thanks goes to these wonderful people:
| :---: | :---: | :---: | :---: | :---: | :---: | :---: | | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| [<img src="https://avatars2.githubusercontent.com/u/9014288?v=4" width="48px;"/><br /><sub><b>baustinanki</b></sub>](https://github.com/baustinanki)<br /> | [<img src="https://avatars0.githubusercontent.com/u/371475?v=4" width="48px;"/><br /><sub><b>lucus lee</b></sub>](https://github.com/lixin9311)<br /> | [<img src="https://avatars1.githubusercontent.com/u/7537841?v=4" width="48px;"/><br /><sub><b>Mike Lloyd</b></sub>](https://github.com/mxplusb)<br /> | [<img src="https://avatars3.githubusercontent.com/u/10998?v=4" width="48px;"/><br /><sub><b>Sergio Rubio</b></sub>](http://rubiojr.rbel.co)<br /> | [<img src="https://avatars3.githubusercontent.com/u/17374492?v=4" width="48px;"/><br /><sub><b>Farhad Farahi</b></sub>](https://github.com/FarhadF)<br /> | [<img src="https://avatars1.githubusercontent.com/u/634604?v=4" width="48px;"/><br /><sub><b>Lasantha Kularatne</b></sub>](http://lasantha.blogspot.com/)<br /> | [<img src="https://avatars1.githubusercontent.com/u/823331?v=4" width="48px;"/><br /><sub><b>Mark Old</b></sub>](https://github.com/dlom)<br /> | | [<img src="https://avatars2.githubusercontent.com/u/9014288?v=4" width="48px;"/><br /><sub><b>baustinanki</b></sub>](https://github.com/baustinanki)<br /> | [<img src="https://avatars0.githubusercontent.com/u/371475?v=4" width="48px;"/><br /><sub><b>lucus lee</b></sub>](https://github.com/lixin9311)<br /> | [<img src="https://avatars1.githubusercontent.com/u/7537841?v=4" width="48px;"/><br /><sub><b>Mike Lloyd</b></sub>](https://github.com/mxplusb)<br /> | [<img src="https://avatars3.githubusercontent.com/u/10998?v=4" width="48px;"/><br /><sub><b>Sergio Rubio</b></sub>](http://rubiojr.rbel.co)<br /> | [<img src="https://avatars3.githubusercontent.com/u/17374492?v=4" width="48px;"/><br /><sub><b>Farhad Farahi</b></sub>](https://github.com/FarhadF)<br /> | [<img src="https://avatars1.githubusercontent.com/u/634604?v=4" width="48px;"/><br /><sub><b>Lasantha Kularatne</b></sub>](http://lasantha.blogspot.com/)<br /> | [<img src="https://avatars1.githubusercontent.com/u/823331?v=4" width="48px;"/><br /><sub><b>Mark Old</b></sub>](https://github.com/dlom)<br /> |
| [<img src="https://avatars0.githubusercontent.com/u/5546718?v=4" width="48px;"/><br /><sub><b>flw</b></sub>](http://flw.tools/)<br /> | [<img src="https://avatars0.githubusercontent.com/u/6024927?v=4" width="48px;"/><br /><sub><b>David Barda</b></sub>](https://github.com/davebarda)<br /> | [<img src="https://avatars2.githubusercontent.com/u/4261980?v=4" width="48px;"/><br /><sub><b>Geoff Lee</b></sub>](https://github.com/matrinox)<br /> | [<img src="https://avatars3.githubusercontent.com/u/1022918?v=4" width="48px;"/><br /><sub><b>George Opritescu</b></sub>](http://international.github.io)<br /> | [<img src="https://avatars3.githubusercontent.com/u/497310?v=4" width="48px;"/><br /><sub><b>Grazfather</b></sub>](https://twitter.com/Grazfather)<br /> | [<img src="https://avatars2.githubusercontent.com/u/1691120?v=4" width="48px;"/><br /><sub><b>Michael Cordell</b></sub>](http://www.mikecordell.com/)<br /> | [<img src="https://avatars2.githubusercontent.com/u/1215497?v=4" width="48px;"/><br /><sub><b>Patrick José Pereira</b></sub>](http://patrick.ibexcps.com)<br /> | | [<img src="https://avatars0.githubusercontent.com/u/5546718?v=4" width="48px;"/><br /><sub><b>flw</b></sub>](http://flw.tools/)<br /> | [<img src="https://avatars0.githubusercontent.com/u/6024927?v=4" width="48px;"/><br /><sub><b>David Barda</b></sub>](https://github.com/davebarda)<br /> | [<img src="https://avatars2.githubusercontent.com/u/4261980?v=4" width="48px;"/><br /><sub><b>Geoff Lee</b></sub>](https://github.com/matrinox)<br /> | [<img src="https://avatars3.githubusercontent.com/u/1022918?v=4" width="48px;"/><br /><sub><b>George Opritescu</b></sub>](http://international.github.io)<br /> | [<img src="https://avatars3.githubusercontent.com/u/497310?v=4" width="48px;"/><br /><sub><b>Grazfather</b></sub>](https://twitter.com/Grazfather)<br /> | [<img src="https://avatars2.githubusercontent.com/u/1691120?v=4" width="48px;"/><br /><sub><b>Michael Cordell</b></sub>](http://www.mikecordell.com/)<br /> | [<img src="https://avatars2.githubusercontent.com/u/1215497?v=4" width="48px;"/><br /><sub><b>Patrick José Pereira</b></sub>](http://patrick.ibexcps.com)<br /> |
| [<img src="https://avatars2.githubusercontent.com/u/1483092?v=4" width="48px;"/><br /><sub><b>sherod taylor</b></sub>](https://github.com/sherodtaylor)<br /> | [<img src="https://avatars2.githubusercontent.com/u/3062663?v=4" width="48px;"/><br /><sub><b>Andrew Scott</b></sub>](http://cogentia.io)<br /> | [<img src="https://avatars2.githubusercontent.com/u/3252403?v=4" width="48px;"/><br /><sub><b>Anand Sudhir Prayaga</b></sub>](https://github.com/anandsudhir)<br /> | [<img src="https://avatars1.githubusercontent.com/u/12018440?v=4" width="48px;"/><br /><sub><b>Lassi Piironen</b></sub>](https://github.com/lsipii)<br /> | [<img src="https://avatars0.githubusercontent.com/u/14799210?v=4" width="48px;"/><br /><sub><b>BlackWebWolf</b></sub>](https://github.com/BlackWebWolf)<br /> | [<img src="https://avatars0.githubusercontent.com/u/1894885?v=4" width="48px;"/><br /><sub><b>andrewzolotukhin</b></sub>](https://github.com/andrewzolotukhin)<br /> | | [<img src="https://avatars2.githubusercontent.com/u/1483092?v=4" width="48px;"/><br /><sub><b>sherod taylor</b></sub>](https://github.com/sherodtaylor)<br /> | [<img src="https://avatars2.githubusercontent.com/u/3062663?v=4" width="48px;"/><br /><sub><b>Andrew Scott</b></sub>](http://cogentia.io)<br /> | [<img src="https://avatars2.githubusercontent.com/u/3252403?v=4" width="48px;"/><br /><sub><b>Anand Sudhir Prayaga</b></sub>](https://github.com/anandsudhir)<br /> | [<img src="https://avatars1.githubusercontent.com/u/12018440?v=4" width="48px;"/><br /><sub><b>Lassi Piironen</b></sub>](https://github.com/lsipii)<br /> | [<img src="https://avatars0.githubusercontent.com/u/14799210?v=4" width="48px;"/><br /><sub><b>BlackWebWolf</b></sub>](https://github.com/BlackWebWolf)<br /> | [<img src="https://avatars0.githubusercontent.com/u/1894885?v=4" width="48px;"/><br /><sub><b>andrewzolotukhin</b></sub>](https://github.com/andrewzolotukhin)<br /> | [<img src="https://avatars1.githubusercontent.com/u/8568280?v=4" width="48px;"/><br /><sub><b>Leon Stigter</b></sub>](https://retgits.github.io)<br /> |
<!-- ALL-CONTRIBUTORS-LIST:END --> <!-- ALL-CONTRIBUTORS-LIST:END -->
This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind welcome! This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind welcome!

View File

@ -1,5 +1,5 @@
--- ---
title: "Logging" title: "Logger"
date: 2018-06-16T14:22:18-07:00 date: 2018-06-16T14:22:18-07:00
draft: false draft: false
--- ---
@ -9,14 +9,14 @@ Displays the contents of the WTF log file.
To log to this file in your own modules: To log to this file in your own modules:
```golang ```golang
require "github.com/senorprogrammer/wtf/logging" require "github.com/senorprogrammer/wtf/logger"
logging.Log("This is a log entry") logger.Log("This is a log entry")
``` ```
## Source Code ## Source Code
```bash ```bash
wtf/logging/ wtf/logger/
``` ```
## Required ENV Variables ## Required ENV Variables
@ -30,7 +30,7 @@ Arrow keys scroll through the log file.
## Configuration ## Configuration
```yaml ```yaml
textfile: logger:
enabled: true enabled: true
position: position:
top: 5 top: 5
@ -44,6 +44,10 @@ textfile:
`enabled` <br /> `enabled` <br />
Determines whether or not this module is executed and if its data displayed onscreen. <br /> Determines whether or not this module is executed and if its data displayed onscreen. <br />
**Note:** If you're using logging and logging is _disabled_, your logs
will still be written to file, the widget just won't be shown onscreen.
If you have `logger.Log` calls in your code, regardless of this setting,
they will be written out. <br />
Values: `true`, `false`. Values: `true`, `false`.
`position` <br /> `position` <br />

View File

@ -0,0 +1,87 @@
---
title: "Trello"
date: 2018-05-10T10:44:35-07:00
draft: false
---
Displays all Trello cards on specified lists.
<img src="/imgs/modules/trello.png" width="640" height="188" alt="trello screenshot" />
## Source Code
```bash
wtf/trello/
```
## Required ENV Variables
<span class="caption">Key:</span> `WTF_TRELLO_APP_KEY` <br />
<span class="caption">Value:</span> Your Trello App Key. <br />
<span class="caption">Key:</span> `WTF_TRELLO_ACCESS_TOKEN` <br />
<span class="caption">Value:</span> Your Trello Access Token. <br />
_You can get your API key at: trello.com/app-key._
## Keyboard Commands
None.
## Configuration
### Single Trello List
```yaml
trello:
board: Main
enabled: true
list: "Todo"
position:
height: 1
left: 2
top: 0
width: 1
refreshInterval: 3600
username: myname
```
### Multiple Trello Lists
If you want to monitor multiple Trello lists, use the following
configuration (note the difference in `list`):
```yaml
trello:
board: Main
enabled: true
list: ["Todo", "Done"]
position:
height: 1
left: 2
top: 0
width: 1
refreshInterval: 3600
username: myname
```
### Attributes
`board` <br />
The name of the Trello board. <br />
`enabled` <br />
Determines whether or not this module is executed and if its data displayed onscreen. <br />
Values: `true`, `false`.
`list` <br />
The Trello lists to fetch cards from. <br />
`refreshInterval` <br />
How often, in seconds, this module will update its data. <br />
Values: A positive integer, `0..n`.
`username` <br />
Your Trello username. <br />
`position` <br />
Where in the grid this module's widget will be displayed. <br />

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

View File

@ -38,7 +38,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logging/">Logging</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -46,6 +46,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul> </ul>
</div> </div>

View File

@ -79,7 +79,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logging/">Logging</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -87,6 +87,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul> </ul>
</div> </div>

View File

@ -81,7 +81,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logging/">Logging</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -89,6 +89,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul> </ul>
</div> </div>

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

View File

@ -80,7 +80,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logging/">Logging</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -88,6 +88,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul> </ul>
</div> </div>

View File

@ -12,17 +12,16 @@
<item> <item>
<title>Logging</title> <title>Logger</title>
<link>https://wtfutil.com/posts/modules/logging/</link> <link>https://wtfutil.com/posts/modules/logger/</link>
<pubDate>Sat, 16 Jun 2018 14:22:18 -0700</pubDate> <pubDate>Sat, 16 Jun 2018 14:22:18 -0700</pubDate>
<guid>https://wtfutil.com/posts/modules/logging/</guid> <guid>https://wtfutil.com/posts/modules/logger/</guid>
<description>Displays the contents of the WTF log file. <description>Displays the contents of the WTF log file.
To log to this file in your own modules: To log to this file in your own modules:
require &amp;#34;github.com/senorprogrammer/wtf/logging&amp;#34; logging.Log(&amp;#34;This is a log entry&amp;#34;) Source Code wtf/logging/ Required ENV Variables None. require &amp;#34;github.com/senorprogrammer/wtf/logger&amp;#34; logger.Log(&amp;#34;This is a log entry&amp;#34;) Source Code wtf/logger/ Required ENV Variables None.
Keyboard Commands Arrow keys scroll through the log file. Keyboard Commands Arrow keys scroll through the log file.
Configuration textfile:enabled:trueposition:top:5left:4height:2width:1refreshInterval:1 Attributes enabled Determines whether or not this module is executed and if its data displayed onscreen. Values: true, false. Configuration logger:enabled:trueposition:top:5left:4height:2width:1refreshInterval:1 Attributes enabled Determines whether or not this module is executed and if its data displayed onscreen. Note: If you&amp;rsquo;re using logging and logging is disabled, your logs will still be written to file, the widget just won&amp;rsquo;t be shown onscreen.</description>
position Defines where in the grid this module&amp;rsquo;s widget will be displayed.</description>
</item> </item>
<item> <item>
@ -284,6 +283,19 @@ Configuration Single Jira Project jira:colors:rows:even:&amp;#34;lightblue&amp;#
jira:colors:rows:even:&amp;#34;lightblue&amp;#34;odd:&amp;#34;white&amp;#34;domain:&amp;#34;https://umbrellacorp.atlassian.net&amp;#34;email:&amp;#34;chriscummer@me.com&amp;#34;enabled:truejql:&amp;#34;issueType = Story&amp;#34;position:top:4left:1height:1width:2project:[&amp;#34;ProjectA&amp;#34;,&amp;#34;ProjectB&amp;#34;]refreshInterval:900username:&amp;#34;chris.cummer&amp;#34;verifyServerCertificate:true Attributes colors.rows.even Define the foreground color for even-numbered rows. Values: Any X11 color name.</description> jira:colors:rows:even:&amp;#34;lightblue&amp;#34;odd:&amp;#34;white&amp;#34;domain:&amp;#34;https://umbrellacorp.atlassian.net&amp;#34;email:&amp;#34;chriscummer@me.com&amp;#34;enabled:truejql:&amp;#34;issueType = Story&amp;#34;position:top:4left:1height:1width:2project:[&amp;#34;ProjectA&amp;#34;,&amp;#34;ProjectB&amp;#34;]refreshInterval:900username:&amp;#34;chris.cummer&amp;#34;verifyServerCertificate:true Attributes colors.rows.even Define the foreground color for even-numbered rows. Values: Any X11 color name.</description>
</item> </item>
<item>
<title>Trello</title>
<link>https://wtfutil.com/posts/modules/trello/</link>
<pubDate>Thu, 10 May 2018 10:44:35 -0700</pubDate>
<guid>https://wtfutil.com/posts/modules/trello/</guid>
<description>Displays all Trello cards on specified lists.
Source Code wtf/trello/ Required ENV Variables Key: WTF_TRELLO_APP_KEY Value: Your Trello App Key. Key: WTF_TRELLO_ACCESS_TOKEN Value: Your Trello Access Token. You can get your API key at: trello.com/app-key.
Keyboard Commands None.
Configuration Single Trello List trello:board:Mainenabled:truelist:&amp;#34;Todo&amp;#34;position:height:1left:2top:0width:1refreshInterval:3600username:myname Multiple Trello Lists If you want to monitor multiple Trello lists, use the following configuration (note the difference in list):
trello:board:Mainenabled:truelist:[&amp;#34;Todo&amp;#34;,&amp;#34;Done&amp;#34;]position:height:1left:2top:0width:1refreshInterval:3600username:myname Attributes board The name of the Trello board.</description>
</item>
<item> <item>
<title>Google Calendar</title> <title>Google Calendar</title>
<link>https://wtfutil.com/posts/modules/gcal/</link> <link>https://wtfutil.com/posts/modules/gcal/</link>

View File

@ -79,7 +79,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logging/">Logging</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -87,6 +87,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul> </ul>
</div> </div>

View File

@ -79,7 +79,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logging/">Logging</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -87,6 +87,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul> </ul>
</div> </div>

View File

@ -79,7 +79,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logging/">Logging</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -87,6 +87,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul> </ul>
</div> </div>

View File

@ -79,7 +79,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logging/">Logging</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -87,6 +87,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul> </ul>
</div> </div>

View File

@ -81,7 +81,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logging/">Logging</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -89,6 +89,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul> </ul>
</div> </div>
@ -107,7 +108,7 @@
<ul class="posts"> <ul class="posts">
<li> <li>
<span> <span>
<a href="https://wtfutil.com/posts/modules/logging/">Logging</a> <a href="https://wtfutil.com/posts/modules/logger/">Logger</a>
<time class="pull-right post-list">Jun 16, 2018</time> <time class="pull-right post-list">Jun 16, 2018</time>
@ -237,6 +238,13 @@
<time class="pull-right post-list">May 10, 2018</time> <time class="pull-right post-list">May 10, 2018</time>
</span>
</li><li>
<span>
<a href="https://wtfutil.com/posts/modules/trello/">Trello</a>
<time class="pull-right post-list">May 10, 2018</time>
</span> </span>
</li><li> </li><li>
<span> <span>

View File

@ -12,17 +12,16 @@
<item> <item>
<title>Logging</title> <title>Logger</title>
<link>https://wtfutil.com/posts/modules/logging/</link> <link>https://wtfutil.com/posts/modules/logger/</link>
<pubDate>Sat, 16 Jun 2018 14:22:18 -0700</pubDate> <pubDate>Sat, 16 Jun 2018 14:22:18 -0700</pubDate>
<guid>https://wtfutil.com/posts/modules/logging/</guid> <guid>https://wtfutil.com/posts/modules/logger/</guid>
<description>Displays the contents of the WTF log file. <description>Displays the contents of the WTF log file.
To log to this file in your own modules: To log to this file in your own modules:
require &amp;#34;github.com/senorprogrammer/wtf/logging&amp;#34; logging.Log(&amp;#34;This is a log entry&amp;#34;) Source Code wtf/logging/ Required ENV Variables None. require &amp;#34;github.com/senorprogrammer/wtf/logger&amp;#34; logger.Log(&amp;#34;This is a log entry&amp;#34;) Source Code wtf/logger/ Required ENV Variables None.
Keyboard Commands Arrow keys scroll through the log file. Keyboard Commands Arrow keys scroll through the log file.
Configuration textfile:enabled:trueposition:top:5left:4height:2width:1refreshInterval:1 Attributes enabled Determines whether or not this module is executed and if its data displayed onscreen. Values: true, false. Configuration logger:enabled:trueposition:top:5left:4height:2width:1refreshInterval:1 Attributes enabled Determines whether or not this module is executed and if its data displayed onscreen. Note: If you&amp;rsquo;re using logging and logging is disabled, your logs will still be written to file, the widget just won&amp;rsquo;t be shown onscreen.</description>
position Defines where in the grid this module&amp;rsquo;s widget will be displayed.</description>
</item> </item>
<item> <item>
@ -284,6 +283,19 @@ Configuration Single Jira Project jira:colors:rows:even:&amp;#34;lightblue&amp;#
jira:colors:rows:even:&amp;#34;lightblue&amp;#34;odd:&amp;#34;white&amp;#34;domain:&amp;#34;https://umbrellacorp.atlassian.net&amp;#34;email:&amp;#34;chriscummer@me.com&amp;#34;enabled:truejql:&amp;#34;issueType = Story&amp;#34;position:top:4left:1height:1width:2project:[&amp;#34;ProjectA&amp;#34;,&amp;#34;ProjectB&amp;#34;]refreshInterval:900username:&amp;#34;chris.cummer&amp;#34;verifyServerCertificate:true Attributes colors.rows.even Define the foreground color for even-numbered rows. Values: Any X11 color name.</description> jira:colors:rows:even:&amp;#34;lightblue&amp;#34;odd:&amp;#34;white&amp;#34;domain:&amp;#34;https://umbrellacorp.atlassian.net&amp;#34;email:&amp;#34;chriscummer@me.com&amp;#34;enabled:truejql:&amp;#34;issueType = Story&amp;#34;position:top:4left:1height:1width:2project:[&amp;#34;ProjectA&amp;#34;,&amp;#34;ProjectB&amp;#34;]refreshInterval:900username:&amp;#34;chris.cummer&amp;#34;verifyServerCertificate:true Attributes colors.rows.even Define the foreground color for even-numbered rows. Values: Any X11 color name.</description>
</item> </item>
<item>
<title>Trello</title>
<link>https://wtfutil.com/posts/modules/trello/</link>
<pubDate>Thu, 10 May 2018 10:44:35 -0700</pubDate>
<guid>https://wtfutil.com/posts/modules/trello/</guid>
<description>Displays all Trello cards on specified lists.
Source Code wtf/trello/ Required ENV Variables Key: WTF_TRELLO_APP_KEY Value: Your Trello App Key. Key: WTF_TRELLO_ACCESS_TOKEN Value: Your Trello Access Token. You can get your API key at: trello.com/app-key.
Keyboard Commands None.
Configuration Single Trello List trello:board:Mainenabled:truelist:&amp;#34;Todo&amp;#34;position:height:1left:2top:0width:1refreshInterval:3600username:myname Multiple Trello Lists If you want to monitor multiple Trello lists, use the following configuration (note the difference in list):
trello:board:Mainenabled:truelist:[&amp;#34;Todo&amp;#34;,&amp;#34;Done&amp;#34;]position:height:1left:2top:0width:1refreshInterval:3600username:myname Attributes board The name of the Trello board.</description>
</item>
<item> <item>
<title>Google Calendar</title> <title>Google Calendar</title>
<link>https://wtfutil.com/posts/modules/gcal/</link> <link>https://wtfutil.com/posts/modules/gcal/</link>

View File

@ -79,7 +79,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logging/">Logging</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -87,6 +87,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul> </ul>
</div> </div>

View File

@ -79,7 +79,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logging/">Logging</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -87,6 +87,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul> </ul>
</div> </div>

View File

@ -79,7 +79,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logging/">Logging</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -87,6 +87,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul> </ul>
</div> </div>

View File

@ -79,7 +79,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logging/">Logging</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -87,6 +87,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul> </ul>
</div> </div>

View File

@ -79,7 +79,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logging/">Logging</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -87,6 +87,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul> </ul>
</div> </div>

View File

@ -79,7 +79,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logging/">Logging</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -87,6 +87,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul> </ul>
</div> </div>

View File

@ -79,7 +79,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logging/">Logging</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -87,6 +87,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul> </ul>
</div> </div>

View File

@ -79,7 +79,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logging/">Logging</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -87,6 +87,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul> </ul>
</div> </div>

View File

@ -79,7 +79,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logging/">Logging</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -87,6 +87,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul> </ul>
</div> </div>

View File

@ -79,7 +79,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logging/">Logging</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -87,6 +87,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul> </ul>
</div> </div>

View File

@ -79,7 +79,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logging/">Logging</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -87,6 +87,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul> </ul>
</div> </div>

View File

@ -79,7 +79,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logging/">Logging</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -87,6 +87,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul> </ul>
</div> </div>

View File

@ -79,7 +79,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logging/">Logging</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -87,6 +87,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul> </ul>
</div> </div>

View File

@ -79,7 +79,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logging/">Logging</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -87,6 +87,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul> </ul>
</div> </div>

View File

@ -79,7 +79,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logging/">Logging</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -87,6 +87,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul> </ul>
</div> </div>

View File

@ -79,7 +79,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logging/">Logging</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -87,6 +87,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul> </ul>
</div> </div>

View File

@ -79,7 +79,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logging/">Logging</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -87,6 +87,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul> </ul>
</div> </div>

View File

@ -79,7 +79,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logging/">Logging</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -87,6 +87,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul> </ul>
</div> </div>

View File

@ -10,8 +10,8 @@
<meta name="generator" content="Hugo 0.38.2" /> <meta name="generator" content="Hugo 0.38.2" />
<title>Logging | WTF - A Terminal Dashboard</title> <title>Logger | WTF - A Terminal Dashboard</title>
<meta content="Logging - WTF - A Terminal Dashboard" property="og:title"> <meta content="Logger - WTF - A Terminal Dashboard" property="og:title">
<meta content=" - " property="og:description"> <meta content=" - " property="og:description">
<!-- CSS --> <!-- CSS -->
<link rel="stylesheet" href="//cdn.rawgit.com/milligram/milligram/master/dist/milligram.min.css"> <link rel="stylesheet" href="//cdn.rawgit.com/milligram/milligram/master/dist/milligram.min.css">
@ -79,7 +79,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logging/">Logging</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -87,6 +87,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul> </ul>
</div> </div>
@ -102,7 +103,7 @@
<div class="content container"> <div class="content container">
<div class="post"> <div class="post">
<h1>Logging</h1> <h1>Logger</h1>
<div class="col-sm-12 col-md-12"> <div class="col-sm-12 col-md-12">
<span class="text-left post-date meta"> <span class="text-left post-date meta">
@ -123,10 +124,10 @@
<p>Displays the contents of the WTF log file.</p> <p>Displays the contents of the WTF log file.</p>
<p>To log to this file in your own modules:</p> <p>To log to this file in your own modules:</p>
<div class="highlight"><pre class="chroma"><code class="language-golang" data-lang="golang"><span class="nx">require</span> <span class="s">&#34;github.com/senorprogrammer/wtf/logging&#34;</span> <div class="highlight"><pre class="chroma"><code class="language-golang" data-lang="golang"><span class="nx">require</span> <span class="s">&#34;github.com/senorprogrammer/wtf/logger&#34;</span>
<span class="nx">logging</span><span class="p">.</span><span class="nx">Log</span><span class="p">(</span><span class="s">&#34;This is a log entry&#34;</span><span class="p">)</span></code></pre></div> <span class="nx">logger</span><span class="p">.</span><span class="nx">Log</span><span class="p">(</span><span class="s">&#34;This is a log entry&#34;</span><span class="p">)</span></code></pre></div>
<h2 id="source-code">Source Code</h2> <h2 id="source-code">Source Code</h2>
<div class="highlight"><pre class="chroma"><code class="language-bash" data-lang="bash">wtf/logging/</code></pre></div> <div class="highlight"><pre class="chroma"><code class="language-bash" data-lang="bash">wtf/logger/</code></pre></div>
<h2 id="required-env-variables">Required ENV Variables</h2> <h2 id="required-env-variables">Required ENV Variables</h2>
<p>None.</p> <p>None.</p>
@ -136,7 +137,7 @@
<p>Arrow keys scroll through the log file.</p> <p>Arrow keys scroll through the log file.</p>
<h2 id="configuration">Configuration</h2> <h2 id="configuration">Configuration</h2>
<div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">textfile<span class="p">:</span><span class="w"> <div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">logger<span class="p">:</span><span class="w">
</span><span class="w"> </span>enabled<span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="w"> </span><span class="w"> </span>enabled<span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="w">
</span><span class="w"> </span>position<span class="p">:</span><span class="w"> </span><span class="w"> </span>position<span class="p">:</span><span class="w">
</span><span class="w"> </span>top<span class="p">:</span><span class="w"> </span><span class="m">5</span><span class="w"> </span><span class="w"> </span>top<span class="p">:</span><span class="w"> </span><span class="m">5</span><span class="w">
@ -148,6 +149,10 @@
<p><code>enabled</code> <br /> <p><code>enabled</code> <br />
Determines whether or not this module is executed and if its data displayed onscreen. <br /> Determines whether or not this module is executed and if its data displayed onscreen. <br />
<strong>Note:</strong> If you&rsquo;re using logging and logging is <em>disabled</em>, your logs
will still be written to file, the widget just won&rsquo;t be shown onscreen.
If you have <code>logger.Log</code> calls in your code, regardless of this setting,
they will be written out. <br />
Values: <code>true</code>, <code>false</code>.</p> Values: <code>true</code>, <code>false</code>.</p>
<p><code>position</code> <br /> <p><code>position</code> <br />

View File

@ -79,7 +79,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logging/">Logging</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -87,6 +87,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul> </ul>
</div> </div>

View File

@ -79,7 +79,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logging/">Logging</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -87,6 +87,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul> </ul>
</div> </div>

View File

@ -79,7 +79,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logging/">Logging</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -87,6 +87,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul> </ul>
</div> </div>

View File

@ -79,7 +79,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logging/">Logging</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -87,6 +87,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul> </ul>
</div> </div>

View File

@ -79,7 +79,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logging/">Logging</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -87,6 +87,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul> </ul>
</div> </div>

View File

@ -79,7 +79,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logging/">Logging</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -87,6 +87,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul> </ul>
</div> </div>

View File

@ -79,7 +79,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logging/">Logging</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -87,6 +87,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul> </ul>
</div> </div>

View File

@ -0,0 +1,205 @@
<!DOCTYPE html>
<html lang="en-us" class="wf-firasans-n4-active wf-active">
<head>
<link href="http://gmpg.org/xfn/11" rel="profile">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- Enable responsiveness on mobile devices -->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<meta name="generator" content="Hugo 0.38.2" />
<title>Trello | WTF - A Terminal Dashboard</title>
<meta content="Trello - WTF - A Terminal Dashboard" property="og:title">
<meta content=" - " property="og:description">
<!-- CSS -->
<link rel="stylesheet" href="//cdn.rawgit.com/milligram/milligram/master/dist/milligram.min.css">
<link href="https://fonts.googleapis.com/css?family=Fira+Sans:300,300i,400,400i|Roboto+Mono:300,300i,400,400i" rel="stylesheet">
<link rel="stylesheet" href="https://wtfutil.com/css/print.css" media="print">
<link rel="stylesheet" href="https://wtfutil.com/css/poole.css">
<link rel="stylesheet" href="https://wtfutil.com/css/hyde.css">
<link rel="stylesheet" href="https://wtfutil.com/css/syntax.css">
<link rel="stylesheet" href="https://wtfutil.com/css/wtf.css">
<!-- Font-Awesome -->
<script defer src="https://use.fontawesome.com/releases/v5.0.9/js/all.js" integrity="sha384-8iPTk2s/jMVj81dnzb/iFR2sdA7u06vHJyyLlAd4snFpCl/SnyUjRrbdJsw1pGIl" crossorigin="anonymous"></script>
<!-- Customised CSS -->
<link rel="stylesheet" href="https://wtfutil.com/css/custom.css">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<!-- Icons -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/apple-touch-icon-144-precomposed.png">
<link rel="shortcut icon" href="/favicon.png">
<script async defer src="https://buttons.github.io/buttons.js"></script>
</head>
<body>
<div class="sidebar">
<div class="container">
<div class="sidebar-about text-center">
<a href="https://wtfutil.com/"> <img src="/img/wtf.png" alt="WFT Logo" class="" width=""> </a>
<p class="lead">
</p>
</div>
<div>
<h3 style="color: white;">Content</h3>
<ul style="list-style-type: none;">
<li class="sidebar-list-item-1"><a href="/posts/overview/">Overview</a></li>
<li class="sidebar-list-item-1"><a href="/posts/installation/">Installation</a></li>
<li class="sidebar-list-item-1"><a href="/posts/configuration/">Configuration</a></li>
<li class="sidebar-list-item-2"><a href="/posts/configuration/attributes/">Attributes</a></li>
<li class="sidebar-list-item-2"><a href="/posts/configuration/iterm2/">iTerm2</a></li>
<li class="sidebar-list-item-1"><a href="https://github.com/senorprogrammer/wtf/releases">Releases</a></li>
</ul>
<ul style="list-style-type: none;">
<li class="sidebar-list-item-1"><a href="/posts/modules/">Modules</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/bamboohr/">BambooHR</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/cryptocurrencies/bittrex/">Bittrex</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/cryptocurrencies/blockfolio/">Blockfolio</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/circleci/">CircleCI</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/clocks/">Clocks</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/cryptocurrencies/cryptolive/">CryptoLive</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/cmdrunner/">CmdRunner</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/git/">Git</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/github/">GitHub</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/gitlab/">Gitlab</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/gcal/">Google Calendar</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/gspreadsheet">Google Spreadsheet</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/ipapi/">IP-API</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/prettyweather/">PrettyWeather</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul>
</div>
<p class="copyright">
&copy; 2018 Chris Cummer.
<br />
<a href="https://creativecommons.org/licenses/by/4.0">Some Rights Reserved</a>.
</p>
</div>
</div>
<div class="content container">
<div class="post">
<h1>Trello</h1>
<div class="col-sm-12 col-md-12">
<span class="text-left post-date meta">
May 10, 2018
<br/>
</span>
</div>
<p>Displays all Trello cards on specified lists.</p>
<p><img src="/imgs/modules/trello.png" width="640" height="188" alt="trello screenshot" /></p>
<h2 id="source-code">Source Code</h2>
<div class="highlight"><pre class="chroma"><code class="language-bash" data-lang="bash">wtf/trello/</code></pre></div>
<h2 id="required-env-variables">Required ENV Variables</h2>
<p><span class="caption">Key:</span> <code>WTF_TRELLO_APP_KEY</code> <br />
<span class="caption">Value:</span> Your Trello App Key. <br />
<span class="caption">Key:</span> <code>WTF_TRELLO_ACCESS_TOKEN</code> <br />
<span class="caption">Value:</span> Your Trello Access Token. <br /></p>
<p><em>You can get your API key at: trello.com/app-key.</em></p>
<h2 id="keyboard-commands">Keyboard Commands</h2>
<p>None.</p>
<h2 id="configuration">Configuration</h2>
<h3 id="single-trello-list">Single Trello List</h3>
<div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">trello<span class="p">:</span><span class="w">
</span><span class="w"> </span>board<span class="p">:</span><span class="w"> </span>Main<span class="w">
</span><span class="w"> </span>enabled<span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="w">
</span><span class="w"> </span>list<span class="p">:</span><span class="w"> </span><span class="s2">&#34;Todo&#34;</span><span class="w">
</span><span class="w"> </span>position<span class="p">:</span><span class="w">
</span><span class="w"> </span>height<span class="p">:</span><span class="w"> </span><span class="m">1</span><span class="w">
</span><span class="w"> </span>left<span class="p">:</span><span class="w"> </span><span class="m">2</span><span class="w">
</span><span class="w"> </span>top<span class="p">:</span><span class="w"> </span><span class="m">0</span><span class="w">
</span><span class="w"> </span>width<span class="p">:</span><span class="w"> </span><span class="m">1</span><span class="w">
</span><span class="w"> </span>refreshInterval<span class="p">:</span><span class="w"> </span><span class="m">3600</span><span class="w">
</span><span class="w"> </span>username<span class="p">:</span><span class="w"> </span>myname</code></pre></div>
<h3 id="multiple-trello-lists">Multiple Trello Lists</h3>
<p>If you want to monitor multiple Trello lists, use the following
configuration (note the difference in <code>list</code>):</p>
<div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">trello<span class="p">:</span><span class="w">
</span><span class="w"> </span>board<span class="p">:</span><span class="w"> </span>Main<span class="w">
</span><span class="w"> </span>enabled<span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="w">
</span><span class="w"> </span>list<span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="s2">&#34;Todo&#34;</span><span class="p">,</span><span class="w"> </span><span class="s2">&#34;Done&#34;</span><span class="p">]</span><span class="w">
</span><span class="w"> </span>position<span class="p">:</span><span class="w">
</span><span class="w"> </span>height<span class="p">:</span><span class="w"> </span><span class="m">1</span><span class="w">
</span><span class="w"> </span>left<span class="p">:</span><span class="w"> </span><span class="m">2</span><span class="w">
</span><span class="w"> </span>top<span class="p">:</span><span class="w"> </span><span class="m">0</span><span class="w">
</span><span class="w"> </span>width<span class="p">:</span><span class="w"> </span><span class="m">1</span><span class="w">
</span><span class="w"> </span>refreshInterval<span class="p">:</span><span class="w"> </span><span class="m">3600</span><span class="w">
</span><span class="w"> </span>username<span class="p">:</span><span class="w"> </span>myname</code></pre></div>
<h3 id="attributes">Attributes</h3>
<p><code>board</code> <br />
The name of the Trello board. <br /></p>
<p><code>enabled</code> <br />
Determines whether or not this module is executed and if its data displayed onscreen. <br />
Values: <code>true</code>, <code>false</code>.</p>
<p><code>list</code> <br />
The Trello lists to fetch cards from. <br /></p>
<p><code>refreshInterval</code> <br />
How often, in seconds, this module will update its data. <br />
Values: A positive integer, <code>0..n</code>.</p>
<p><code>username</code> <br />
Your Trello username. <br /></p>
<p><code>position</code> <br />
Where in the grid this module&rsquo;s widget will be displayed. <br /></p>
</div>
<div class="footer">
</div>
</div>
</body>
</html>

View File

@ -79,7 +79,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logging/">Logging</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -87,6 +87,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul> </ul>
</div> </div>

View File

@ -79,7 +79,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logging/">Logging</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -87,6 +87,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul> </ul>
</div> </div>

View File

@ -3,7 +3,7 @@
xmlns:xhtml="http://www.w3.org/1999/xhtml"> xmlns:xhtml="http://www.w3.org/1999/xhtml">
<url> <url>
<loc>https://wtfutil.com/posts/modules/logging/</loc> <loc>https://wtfutil.com/posts/modules/logger/</loc>
<lastmod>2018-06-16T14:22:18-07:00</lastmod> <lastmod>2018-06-16T14:22:18-07:00</lastmod>
</url> </url>
@ -97,6 +97,11 @@
<lastmod>2018-05-10T10:44:35-07:00</lastmod> <lastmod>2018-05-10T10:44:35-07:00</lastmod>
</url> </url>
<url>
<loc>https://wtfutil.com/posts/modules/trello/</loc>
<lastmod>2018-05-10T10:44:35-07:00</lastmod>
</url>
<url> <url>
<loc>https://wtfutil.com/posts/modules/gcal/</loc> <loc>https://wtfutil.com/posts/modules/gcal/</loc>
<lastmod>2018-05-10T08:25:33-07:00</lastmod> <lastmod>2018-05-10T08:25:33-07:00</lastmod>

View File

@ -81,7 +81,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/logging/">Logging</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
@ -89,6 +89,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li> <li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul> </ul>
</div> </div>

View File

@ -21,7 +21,7 @@ type Widget struct {
func NewWidget() *Widget { func NewWidget() *Widget {
widget := Widget{ widget := Widget{
TextWidget: wtf.NewTextWidget(" Logs ", "logging", true), TextWidget: wtf.NewTextWidget(" Logs ", "logger", true),
filePath: logFilePath(), filePath: logFilePath(),
} }

8
trello/card.go Normal file
View File

@ -0,0 +1,8 @@
package trello
type TrelloCard struct {
ID string
Name string
List string
Description string
}

98
trello/client.go Normal file
View File

@ -0,0 +1,98 @@
package trello
import (
"fmt"
"github.com/adlio/trello"
"github.com/senorprogrammer/wtf/wtf"
)
func GetCards(client *trello.Client, lists map[string]string) (*SearchResult, error) {
boardID, err := getBoardID(client)
if err != nil {
return nil, err
}
lists, err = getListIDs(client, boardID, lists)
if err != nil {
return nil, err
}
searchResult := &SearchResult{Total: 0}
searchResult.TrelloCards = make(map[string][]TrelloCard)
for listName, listID := range lists {
cards, err := getCardsOnList(client, listID)
if err != nil {
return nil, err
}
searchResult.Total = searchResult.Total + len(cards)
cardArray := make([]TrelloCard, 0)
for _, card := range cards {
trelloCard := TrelloCard{
ID: card.ID,
List: listName,
Name: card.Name,
Description: card.Desc,
}
cardArray = append(cardArray, trelloCard)
}
searchResult.TrelloCards[listName] = cardArray
}
return searchResult, nil
}
func getBoardID(client *trello.Client) (string, error) {
member, err := client.GetMember(wtf.Config.UString("wtf.mods.trello.username"), trello.Defaults())
if err != nil {
return "", err
}
boards, err := member.GetBoards(trello.Defaults())
if err != nil {
return "", err
}
for _, board := range boards {
if board.Name == wtf.Config.UString("wtf.mods.trello.board") {
return board.ID, nil
}
}
return "", fmt.Errorf("could not find board with name %s", wtf.Config.UString("wtf.mods.trello.board"))
}
func getListIDs(client *trello.Client, boardID string, lists map[string]string) (map[string]string, error) {
board, err := client.GetBoard(boardID, trello.Defaults())
if err != nil {
return nil, err
}
boardLists, err := board.GetLists(trello.Defaults())
if err != nil {
return nil, err
}
for _, list := range boardLists {
if _, ok := lists[list.Name]; ok {
lists[list.Name] = list.ID
}
}
return lists, nil
}
func getCardsOnList(client *trello.Client, listID string) ([]*trello.Card, error) {
list, err := client.GetList(listID, trello.Defaults())
if err != nil {
return nil, err
}
cards, err := list.GetCards(trello.Defaults())
if err != nil {
return nil, err
}
return cards, nil
}

6
trello/search_result.go Normal file
View File

@ -0,0 +1,6 @@
package trello
type SearchResult struct {
Total int
TrelloCards map[string][]TrelloCard
}

81
trello/widget.go Normal file
View File

@ -0,0 +1,81 @@
package trello
import (
"fmt"
"os"
"github.com/adlio/trello"
"github.com/senorprogrammer/wtf/wtf"
)
type Widget struct {
wtf.TextWidget
}
func NewWidget() *Widget {
widget := Widget{
TextWidget: wtf.NewTextWidget(" Trello ", "trello", false),
}
return &widget
}
/* -------------------- Exported Functions -------------------- */
func (widget *Widget) Refresh() {
client := trello.NewClient(os.Getenv("WTF_TRELLO_APP_KEY"), os.Getenv("WTF_TRELLO_ACCESS_TOKEN"))
// Get the cards
searchResult, err := GetCards(client, getLists())
widget.UpdateRefreshedAt()
if err != nil {
widget.View.SetWrap(true)
widget.View.SetTitle(fmt.Sprintf("%s", widget.Name))
fmt.Fprintf(widget.View, "%v", err)
} else {
widget.View.SetWrap(false)
widget.View.SetTitle(
fmt.Sprintf(
"[white]%s: [green]%s ",
widget.Name,
wtf.Config.UString("wtf.mods.trello.board"),
),
)
widget.View.SetText(fmt.Sprintf("%s", widget.contentFrom(searchResult)))
}
}
/* -------------------- Unexported Functions -------------------- */
func (widget *Widget) contentFrom(searchResult *SearchResult) string {
str := ""
for list, cardArray := range searchResult.TrelloCards {
str = fmt.Sprintf("%s [red]Cards in %s[white]\n", str, list)
for _, card := range cardArray {
str = fmt.Sprintf("%s [green]%s[white]\n", str, card.Name)
}
str = fmt.Sprintf("%s\n", str)
}
return str
}
func getLists() map[string]string {
list := make(map[string]string)
// see if project is set to a single string
configPath := "wtf.mods.trello.list"
singleList, err := wtf.Config.String(configPath)
if err == nil {
list[singleList] = ""
return list
}
// else, assume list
multiList := wtf.Config.UList(configPath)
for _, proj := range multiList {
if str, ok := proj.(string); ok {
list[str] = ""
}
}
return list
}

28
vendor/github.com/adlio/trello/.gitignore generated vendored Normal file
View File

@ -0,0 +1,28 @@
# Compiled Object files, Static and Dynamic libs (Shared Objects)
*.o
*.a
*.so
# Folders
_obj
_test
# Architecture specific extensions/prefixes
*.[568vq]
[568vq].out
*.cgo1.go
*.cgo2.c
_cgo_defun.c
_cgo_gotypes.go
_cgo_export.*
_testmain.go
*.exe
*.test
*.prof
coverage.sh
coverage.out
coverage.html

11
vendor/github.com/adlio/trello/.travis.yml generated vendored Normal file
View File

@ -0,0 +1,11 @@
language: go
sudo: false
go:
- 1.7
- 1.8
- tip
before_install:
- go get github.com/mattn/goveralls
script:
- $HOME/gopath/bin/goveralls -service=travis-ci

21
vendor/github.com/adlio/trello/LICENSE generated vendored Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2016 Aaron Longwell
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

232
vendor/github.com/adlio/trello/README.md generated vendored Normal file
View File

@ -0,0 +1,232 @@
Go Trello API
================
[![Trello Logo](https://raw.githubusercontent.com/adlio/trello/master/trello-logo.png)](https://www.trello.com)
[![GoDoc](https://godoc.org/github.com/adlio/trello?status.svg)](http://godoc.org/github.com/adlio/trello)
[![Build Status](https://travis-ci.org/adlio/trello.svg)](https://travis-ci.org/adlio/trello)
[![Coverage Status](https://coveralls.io/repos/github/adlio/trello/badge.svg?branch=master)](https://coveralls.io/github/adlio/trello?branch=master)
A #golang package to access the [Trello API](https://developers.trello.com/v1.0/reference). Nearly 100% of the
read-only surface area of the API is covered, as is creation and modification of Cards.
Low-level infrastructure for features to modify Lists and Boards are easy to add... just not
done yet.
Pull requests are welcome for missing features.
My current development focus is documentation, especially enhancing this README.md with more
example use cases.
## Installation
The Go Trello API has been Tested compatible with Go 1.7 on up. Its only dependency is
the `github.com/pkg/errors` package. It otherwise relies only on the Go standard library.
```
go get github.com/adlio/trello
```
## Basic Usage
All interaction starts with a `trello.Client`. Create one with your appKey and token:
```Go
client := trello.NewClient(appKey, token)
```
All API requests accept a trello.Arguments object. This object is a simple
`map[string]string`, converted to query string arguments in the API call.
Trello has sane defaults on API calls. We have a `trello.Defaults()` utility function
which can be used when you desire the default Trello arguments. Internally,
`trello.Defaults()` is an empty map, which translates to an empty query string.
```Go
board, err := client.GetBoard("bOaRdID", trello.Defaults())
if err != nil {
// Handle error
}
```
## Client Longevity
When getting Lists from Boards or Cards from Lists, the original `trello.Client` pointer
is carried along in returned child objects. It's important to realize that this enables
you to make additional API calls via functions invoked on the objects you receive:
```Go
client := trello.NewClient(appKey, token)
board, err := client.GetBoard("ID", trello.Defaults())
// GetLists makes an API call to /boards/:id/lists using credentials from `client`
lists, err := board.GetLists(trello.Defaults())
for _, list := range lists {
// GetCards makes an API call to /lists/:id/cards using credentials from `client`
cards, err := list.GetCards(trello.Defaults())
}
```
## Get Trello Boards for a User
Boards can be retrieved directly by their ID (see example above), or by asking
for all boards for a member:
```Go
member, err := client.GetMember("usernameOrId", trello.Defaults())
if err != nil {
// Handle error
}
boards, err := member.GetBoards(trello.Defaults())
if err != nil {
// Handle error
}
```
## Get Trello Lists on a Board
```Go
board, err := client.GetBoard("bOaRdID", trello.Defaults())
if err != nil {
// Handle error
}
lists, err := board.GetLists(trello.Defaults())
if err != nil {
// Handle error
}
```
## Get Trello Cards on a Board
```Go
board, err := client.GetBoard("bOaRdID", trello.Defaults())
if err != nil {
// Handle error
}
cards, err := board.GetCards(trello.Defaults())
if err != nil {
// Handle error
}
```
## Get Trello Cards on a List
```Go
list, err := client.GetList("lIsTID", trello.Defaults())
if err != nil {
// Handle error
}
cards, err := list.GetCards(trello.Defaults())
if err != nil {
// Handle error
}
```
## Creating a Card
The API provides several mechanisms for creating new cards.
### Creating Cards from Scratch on the Client
This approach requires the most input data on the card:
```Go
card := trello.Card{
Name: "Card Name",
Desc: "Card description",
Pos: 12345.678,
IDList: "iDOfaLiSt",
IDLabels: []string{"labelID1", "labelID2"},
}
err := client.CreateCard(card, trello.Defaults())
```
### Creating Cards On a List
```Go
list, err := client.GetList("lIsTID", trello.Defaults())
list.AddCard(trello.Card{ Name: "Card Name", Description: "Card description" }, trello.Defaults())
```
### Creating a Card by Copying Another Card
```Go
err := card.CopyToList("listIdNUmber", trello.Defaults())
```
## Get Actions on a Board
```Go
board, err := client.GetBoard("bOaRdID", trello.Defaults())
if err != nil {
// Handle error
}
actions, err := board.GetActions(trello.Defaults())
if err != nil {
// Handle error
}
```
## Get Actions on a Card
```Go
card, err := client.GetCard("cArDID", trello.Defaults())
if err != nil {
// Handle error
}
actions, err := card.GetActions(trello.Defaults())
if err != nil {
// Handle error
}
```
## Rearrange Cards Within a List
```Go
err := card.MoveToTopOfList()
err = card.MoveToBottomOfList()
err = card.SetPos(12345.6789)
```
## Moving a Card to Another List
```Go
err := card.MoveToList("listIdNUmber", trello.Defaults())
```
## Card Ancestry
Trello provides ancestry tracking when cards are created as copies of other cards. This package
provides functions for working with this data:
```Go
// ancestors will hold a slice of *trello.Cards, with the first
// being the card's parent, and the last being parent's parent's parent...
ancestors, err := card.GetAncestorCards(trello.Defaults())
// GetOriginatingCard() is an alias for the last element in the slice
// of ancestor cards.
ultimateParentCard, err := card.GetOriginatingCard(trello.Defaults())
```
## Debug Logging
If you'd like to see all API calls logged, you can attach a `.Logger` (implementing `Debugf(string, ...interface{})`)
to your client. The interface for the logger mimics logrus. Example usage:
```Go
logger := logrus.New()
logger.SetLevel(logrus.DebugLevel)
client := trello.NewClient(appKey, token)
client.Logger = logger
```

5
vendor/github.com/adlio/trello/TODO.txt generated vendored Normal file
View File

@ -0,0 +1,5 @@
- Create List
- Delete Card
- Archive Card
- Reorder Cards in List

57
vendor/github.com/adlio/trello/action-collection.go generated vendored Normal file
View File

@ -0,0 +1,57 @@
package trello
import (
"sort"
)
// ActionCollection is an alias of []*Action, which sorts by the Action's ID.
// Which is the same as sorting by the Action's time of occurrence
type ActionCollection []*Action
func (c ActionCollection) Len() int { return len(c) }
func (c ActionCollection) Swap(i, j int) { c[i], c[j] = c[j], c[i] }
func (c ActionCollection) Less(i, j int) bool { return c[i].ID < c[j].ID }
func (actions ActionCollection) FirstCardCreateAction() *Action {
sort.Sort(actions)
for _, action := range actions {
if action.DidCreateCard() {
return action
}
}
return nil
}
func (actions ActionCollection) ContainsCardCreation() bool {
return actions.FirstCardCreateAction() != nil
}
func (c ActionCollection) FilterToCardCreationActions() ActionCollection {
newSlice := make(ActionCollection, 0, len(c))
for _, action := range c {
if action.DidCreateCard() {
newSlice = append(newSlice, action)
}
}
return newSlice
}
func (c ActionCollection) FilterToListChangeActions() ActionCollection {
newSlice := make(ActionCollection, 0, len(c))
for _, action := range c {
if action.DidChangeListForCard() {
newSlice = append(newSlice, action)
}
}
return newSlice
}
func (c ActionCollection) FilterToCardMembershipChangeActions() ActionCollection {
newSlice := make(ActionCollection, 0, len(c))
for _, action := range c {
if action.DidChangeCardMembership() || action.DidArchiveCard() || action.DidUnarchiveCard() {
newSlice = append(newSlice, action)
}
}
return newSlice
}

148
vendor/github.com/adlio/trello/action.go generated vendored Normal file
View File

@ -0,0 +1,148 @@
// Copyright © 2016 Aaron Longwell
//
// Use of this source code is governed by an MIT licese.
// Details in the LICENSE file.
package trello
import (
"fmt"
"time"
)
type Action struct {
ID string `json:"id"`
IDMemberCreator string `json:"idMemberCreator"`
Type string `json:"type"`
Date time.Time `json:"date"`
Data *ActionData `json:"data,omitempty"`
MemberCreator *Member `json:"memberCreator,omitempty"`
Member *Member `json:"member,omitempty"`
}
type ActionData struct {
Text string `json:"text,omitempty"`
List *List `json:"list,omitempty"`
Card *Card `json:"card,omitempty"`
CardSource *Card `json:"cardSource,omitempty"`
Board *Board `json:"board,omitempty"`
Old *Card `json:"old,omitempty"`
ListBefore *List `json:"listBefore,omitempty"`
ListAfter *List `json:"listAfter,omitempty"`
DateLastEdited time.Time `json:"dateLastEdited"`
CheckItem *CheckItem `json:"checkItem"`
Checklist *Checklist `json:"checklist"`
}
func (b *Board) GetActions(args Arguments) (actions ActionCollection, err error) {
path := fmt.Sprintf("boards/%s/actions", b.ID)
err = b.client.Get(path, args, &actions)
return
}
func (l *List) GetActions(args Arguments) (actions ActionCollection, err error) {
path := fmt.Sprintf("lists/%s/actions", l.ID)
err = l.client.Get(path, args, &actions)
return
}
func (c *Card) GetActions(args Arguments) (actions ActionCollection, err error) {
path := fmt.Sprintf("cards/%s/actions", c.ID)
err = c.client.Get(path, args, &actions)
return
}
// GetListChangeActions retrieves a slice of Actions which resulted in changes
// to the card's active List. This includes the createCard and copyCard action (which
// place the card in its first list, and the updateCard:closed action, which remove it
// from its last list.
//
// This function is just an alias for:
// card.GetActions(Arguments{"filter": "createCard,copyCard,updateCard:idList,updateCard:closed", "limit": "1000"})
//
func (c *Card) GetListChangeActions() (actions ActionCollection, err error) {
return c.GetActions(Arguments{"filter": "createCard,copyCard,updateCard:idList,updateCard:closed"})
}
func (c *Card) GetMembershipChangeActions() (actions ActionCollection, err error) {
// We include updateCard:closed as if the member is implicitly removed from the card when it's closed.
// This allows us to "close out" the duration length.
return c.GetActions(Arguments{"filter": "addMemberToCard,removeMemberFromCard,updateCard:closed"})
}
// DidCreateCard() returns true if this action created a card, false otherwise.
func (a *Action) DidCreateCard() bool {
switch a.Type {
case "createCard", "emailCard", "copyCard", "convertToCardFromCheckItem":
return true
case "moveCardToBoard":
return true // Unsure about this one
default:
return false
}
}
func (a *Action) DidArchiveCard() bool {
return (a.Type == "updateCard") && a.Data != nil && a.Data.Card != nil && a.Data.Card.Closed
}
func (a *Action) DidUnarchiveCard() bool {
return (a.Type == "updateCard") && a.Data != nil && a.Data.Old != nil && a.Data.Old.Closed
}
// Returns true if this action created the card (in which case it caused it to enter its
// first list), archived the card (in which case it caused it to leave its last List),
// or was an updateCard action involving a change to the list. This is supporting
// functionality for ListDuration.
//
func (a *Action) DidChangeListForCard() bool {
if a.DidCreateCard() {
return true
}
if a.DidArchiveCard() {
return true
}
if a.DidUnarchiveCard() {
return true
}
if a.Type == "updateCard" {
if a.Data != nil && a.Data.ListAfter != nil {
return true
}
}
return false
}
func (a *Action) DidChangeCardMembership() bool {
switch a.Type {
case "addMemberToCard":
return true
case "removeMemberFromCard":
return true
default:
return false
}
}
// ListAfterAction calculates which List the card ended up in after this action
// completed. Returns nil when the action resulted in the card being archived (in
// which case we consider it to not be in a list anymore), or when the action isn't
// related to a list at all (in which case this is a nonsensical question to ask).
//
func ListAfterAction(a *Action) *List {
switch a.Type {
case "createCard", "copyCard", "emailCard", "convertToCardFromCheckItem":
return a.Data.List
case "updateCard":
if a.DidArchiveCard() {
return nil
} else if a.DidUnarchiveCard() {
return a.Data.List
}
if a.Data.ListAfter != nil {
return a.Data.ListAfter
}
}
return nil
}

24
vendor/github.com/adlio/trello/arguments.go generated vendored Normal file
View File

@ -0,0 +1,24 @@
// Copyright © 2016 Aaron Longwell
//
// Use of this source code is governed by an MIT licese.
// Details in the LICENSE file.
package trello
import (
"net/url"
)
type Arguments map[string]string
func Defaults() Arguments {
return make(Arguments)
}
func (args Arguments) ToURLValues() url.Values {
v := url.Values{}
for key, value := range args {
v.Set(key, value)
}
return v
}

29
vendor/github.com/adlio/trello/attachment.go generated vendored Normal file
View File

@ -0,0 +1,29 @@
// Copyright © 2016 Aaron Longwell
//
// Use of this source code is governed by an MIT licese.
// Details in the LICENSE file.
package trello
type Attachment struct {
ID string `json:"id"`
Name string `json:"name"`
Pos float32 `json:"pos"`
Bytes int `json:"int"`
Date string `json:"date"`
EdgeColor string `json:"edgeColor"`
IDMember string `json:"idMember"`
IsUpload bool `json:"isUpload"`
MimeType string `json:"mimeType"`
Previews []AttachmentPreview `json:"previews"`
URL string `json:"url"`
}
type AttachmentPreview struct {
ID string `json:"_id"`
URL string `json:"url"`
Width int `json:"width"`
Height int `json:"height"`
Bytes int `json:"bytes"`
Scaled bool `json:"scaled"`
}

89
vendor/github.com/adlio/trello/board.go generated vendored Normal file
View File

@ -0,0 +1,89 @@
// Copyright © 2016 Aaron Longwell
//
// Use of this source code is governed by an MIT licese.
// Details in the LICENSE file.
package trello
import (
"fmt"
"time"
)
type Board struct {
client *Client
ID string `json:"id"`
Name string `json:"name"`
Desc string `json:"desc"`
Closed bool `json:"closed"`
IdOrganization string `json:"idOrganization"`
Pinned bool `json:"pinned"`
Url string `json:"url"`
ShortUrl string `json:"shortUrl"`
Prefs struct {
PermissionLevel string `json:"permissionLevel"`
Voting string `json:"voting"`
Comments string `json:"comments"`
Invitations string `json:"invitations"`
SelfJoin bool `json:"selfjoin"`
CardCovers bool `json:"cardCovers"`
CardAging string `json:"cardAging"`
CalendarFeedEnabled bool `json:"calendarFeedEnabled"`
Background string `json:"background"`
BackgroundColor string `json:"backgroundColor"`
BackgroundImage string `json:"backgroundImage"`
BackgroundImageScaled []BackgroundImage `json:"backgroundImageScaled"`
BackgroundTile bool `json:"backgroundTile"`
BackgroundBrightness string `json:"backgroundBrightness"`
CanBePublic bool `json:"canBePublic"`
CanBeOrg bool `json:"canBeOrg"`
CanBePrivate bool `json:"canBePrivate"`
CanInvite bool `json:"canInvite"`
} `json:"prefs"`
LabelNames struct {
Black string `json:"black,omitempty"`
Blue string `json:"blue,omitempty"`
Green string `json:"green,omitempty"`
Lime string `json:"lime,omitempty"`
Orange string `json:"orange,omitempty"`
Pink string `json:"pink,omitempty"`
Purple string `json:"purple,omitempty"`
Red string `json:"red,omitempty"`
Sky string `json:"sky,omitempty"`
Yellow string `json:"yellow,omitempty"`
} `json:"labelNames"`
Lists []*List `json:"lists"`
Actions []*Action `json:"actions"`
}
type BackgroundImage struct {
Width int `json:"width"`
Height int `json:"height"`
URL string `json:"url"`
}
func (b *Board) CreatedAt() time.Time {
t, _ := IDToTime(b.ID)
return t
}
/**
* Board retrieves a Trello board by its ID.
*/
func (c *Client) GetBoard(boardID string, args Arguments) (board *Board, err error) {
path := fmt.Sprintf("boards/%s", boardID)
err = c.Get(path, args, &board)
if board != nil {
board.client = c
}
return
}
func (m *Member) GetBoards(args Arguments) (boards []*Board, err error) {
path := fmt.Sprintf("members/%s/boards", m.ID)
err = m.client.Get(path, args, &boards)
for i := range boards {
boards[i].client = m.client
}
return
}

388
vendor/github.com/adlio/trello/card.go generated vendored Normal file
View File

@ -0,0 +1,388 @@
// Copyright © 2016 Aaron Longwell
//
// Use of this source code is governed by an MIT licese.
// Details in the LICENSE file.
package trello
import (
"fmt"
"strconv"
"strings"
"time"
"github.com/pkg/errors"
)
type Card struct {
client *Client
// Key metadata
ID string `json:"id"`
IDShort int `json:"idShort"`
Name string `json:"name"`
Pos float64 `json:"pos"`
Email string `json:"email"`
ShortLink string `json:"shortLink"`
ShortUrl string `json:"shortUrl"`
Url string `json:"url"`
Desc string `json:"desc"`
Due *time.Time `json:"due"`
DueComplete bool `json:"dueComplete"`
Closed bool `json:"closed"`
Subscribed bool `json:"subscribed"`
DateLastActivity *time.Time `json:"dateLastActivity"`
// Board
Board *Board
IDBoard string `json:"idBoard"`
// List
List *List
IDList string `json:"idList"`
// Badges
Badges struct {
Votes int `json:"votes"`
ViewingMemberVoted bool `json:"viewingMemberVoted"`
Subscribed bool `json:"subscribed"`
Fogbugz string `json:"fogbugz,omitempty"`
CheckItems int `json:"checkItems"`
CheckItemsChecked int `json:"checkItemsChecked"`
Comments int `json:"comments"`
Attachments int `json:"attachments"`
Description bool `json:"description"`
Due *time.Time `json:"due,omitempty"`
} `json:"badges"`
// Actions
Actions ActionCollection `json:"actions,omitempty"`
// Checklists
IDCheckLists []string `json:"idCheckLists"`
Checklists []*Checklist `json:"checklists,omitempty"`
CheckItemStates []*CheckItemState `json:"checkItemStates,omitempty"`
// Members
IDMembers []string `json:"idMembers,omitempty"`
IDMembersVoted []string `json:"idMembersVoted,omitempty"`
Members []*Member `json:"members,omitempty"`
// Attachments
IDAttachmentCover string `json:"idAttachmentCover"`
ManualCoverAttachment bool `json:"manualCoverAttachment"`
Attachments []*Attachment `json:"attachments,omitempty"`
// Labels
IDLabels []string `json:"idLabels,omitempty"`
Labels []*Label `json:"labels,omitempty"`
}
func (c *Card) CreatedAt() time.Time {
t, _ := IDToTime(c.ID)
return t
}
func (c *Card) MoveToList(listID string, args Arguments) error {
path := fmt.Sprintf("cards/%s", c.ID)
args["idList"] = listID
return c.client.Put(path, args, &c)
}
func (c *Card) SetPos(newPos float64) error {
path := fmt.Sprintf("cards/%s", c.ID)
return c.client.Put(path, Arguments{"pos": fmt.Sprintf("%f", newPos)}, c)
}
func (c *Card) RemoveMember(memberID string) error {
path := fmt.Sprintf("cards/%s/idMembers/%s", c.ID, memberID)
return c.client.Delete(path, Defaults(), nil)
}
func (c *Card) AddMemberID(memberID string) (member []*Member, err error) {
path := fmt.Sprintf("cards/%s/idMembers", c.ID)
err = c.client.Post(path, Arguments{"value": memberID}, &member)
return member, err
}
func (c *Card) MoveToTopOfList() error {
path := fmt.Sprintf("cards/%s", c.ID)
return c.client.Put(path, Arguments{"pos": "top"}, c)
}
func (c *Card) MoveToBottomOfList() error {
path := fmt.Sprintf("cards/%s", c.ID)
return c.client.Put(path, Arguments{"pos": "bottom"}, c)
}
func (c *Card) Update(args Arguments) error {
path := fmt.Sprintf("cards/%s", c.ID)
return c.client.Put(path, args, c)
}
func (c *Client) CreateCard(card *Card, extraArgs Arguments) error {
path := "cards"
args := Arguments{
"name": card.Name,
"desc": card.Desc,
"pos": strconv.FormatFloat(card.Pos, 'g', -1, 64),
"idList": card.IDList,
"idMembers": strings.Join(card.IDMembers, ","),
"idLabels": strings.Join(card.IDLabels, ","),
}
if card.Due != nil {
args["due"] = card.Due.Format(time.RFC3339)
}
// Allow overriding the creation position with 'top' or 'botttom'
if pos, ok := extraArgs["pos"]; ok {
args["pos"] = pos
}
err := c.Post(path, args, &card)
if err == nil {
card.client = c
}
return err
}
func (l *List) AddCard(card *Card, extraArgs Arguments) error {
path := fmt.Sprintf("lists/%s/cards", l.ID)
args := Arguments{
"name": card.Name,
"desc": card.Desc,
"idMembers": strings.Join(card.IDMembers, ","),
"idLabels": strings.Join(card.IDLabels, ","),
}
if card.Due != nil {
args["due"] = card.Due.Format(time.RFC3339)
}
// Allow overwriting the creation position with 'top' or 'bottom'
if pos, ok := extraArgs["pos"]; ok {
args["pos"] = pos
}
err := l.client.Post(path, args, &card)
if err == nil {
card.client = l.client
} else {
err = errors.Wrapf(err, "Error adding card to list %s", l.ID)
}
return err
}
// Try these Arguments
//
// Arguments["keepFromSource"] = "all"
// Arguments["keepFromSource"] = "none"
// Arguments["keepFromSource"] = "attachments,checklists,comments"
//
func (c *Card) CopyToList(listID string, args Arguments) (*Card, error) {
path := "cards"
args["idList"] = listID
args["idCardSource"] = c.ID
newCard := Card{}
err := c.client.Post(path, args, &newCard)
if err == nil {
newCard.client = c.client
} else {
err = errors.Wrapf(err, "Error copying card '%s' to list '%s'.", c.ID, listID)
}
return &newCard, err
}
func (c *Card) AddComment(comment string, args Arguments) (*Action, error) {
path := fmt.Sprintf("cards/%s/actions/comments", c.ID)
args["text"] = comment
action := Action{}
err := c.client.Post(path, args, &action)
if err != nil {
err = errors.Wrapf(err, "Error commenting on card %s", c.ID)
}
return &action, err
}
// If this Card was created from a copy of another Card, this func retrieves
// the originating Card. Returns an error only when a low-level failure occurred.
// If this Card has no parent, a nil card and nil error are returned. In other words, the
// non-existence of a parent is not treated as an error.
//
func (c *Card) GetParentCard(args Arguments) (*Card, error) {
// Hopefully the card came pre-loaded with Actions including the card creation
action := c.Actions.FirstCardCreateAction()
if action == nil {
// No luck. Go get copyCard actions for this card.
c.client.log("Creation action wasn't supplied before GetParentCard() on '%s'. Getting copyCard actions.", c.ID)
actions, err := c.GetActions(Arguments{"filter": "copyCard"})
if err != nil {
err = errors.Wrapf(err, "GetParentCard() failed to GetActions() for card '%s'", c.ID)
return nil, err
}
action = actions.FirstCardCreateAction()
}
if action != nil && action.Data != nil && action.Data.CardSource != nil {
card, err := c.client.GetCard(action.Data.CardSource.ID, args)
return card, err
}
return nil, nil
}
func (c *Card) GetAncestorCards(args Arguments) (ancestors []*Card, err error) {
// Get the first parent
parent, err := c.GetParentCard(args)
if IsNotFound(err) || IsPermissionDenied(err) {
c.client.log("[trello] Can't get details about the parent of card '%s' due to lack of permissions or card deleted.", c.ID)
return ancestors, nil
}
for parent != nil {
ancestors = append(ancestors, parent)
parent, err = parent.GetParentCard(args)
if IsNotFound(err) || IsPermissionDenied(err) {
c.client.log("[trello] Can't get details about the parent of card '%s' due to lack of permissions or card deleted.", c.ID)
return ancestors, nil
} else if err != nil {
return ancestors, err
}
}
return ancestors, err
}
func (c *Card) GetOriginatingCard(args Arguments) (*Card, error) {
ancestors, err := c.GetAncestorCards(args)
if err != nil {
return c, err
}
if len(ancestors) > 0 {
return ancestors[len(ancestors)-1], nil
} else {
return c, nil
}
}
func (c *Card) CreatorMember() (*Member, error) {
var actions ActionCollection
var err error
if len(c.Actions) == 0 {
c.Actions, err = c.GetActions(Arguments{"filter": "all", "limit": "1000", "memberCreator_fields": "all"})
if err != nil {
err = errors.Wrapf(err, "GetActions() call failed.")
return nil, err
}
}
actions = c.Actions.FilterToCardCreationActions()
if len(actions) > 0 {
return actions[0].MemberCreator, nil
}
return nil, errors.Errorf("No card creation actions on Card %s with a .MemberCreator", c.ID)
}
func (c *Card) CreatorMemberID() (string, error) {
var actions ActionCollection
var err error
if len(c.Actions) == 0 {
c.client.log("[trello] CreatorMemberID() called on card '%s' without any Card.Actions. Fetching fresh.", c.ID)
c.Actions, err = c.GetActions(Defaults())
if err != nil {
err = errors.Wrapf(err, "GetActions() call failed.")
}
}
actions = c.Actions.FilterToCardCreationActions()
if len(actions) > 0 {
if actions[0].IDMemberCreator != "" {
return actions[0].IDMemberCreator, err
}
}
return "", errors.Wrapf(err, "No Actions on card '%s' could be used to find its creator.", c.ID)
}
func (b *Board) ContainsCopyOfCard(cardID string, args Arguments) (bool, error) {
args["filter"] = "copyCard"
actions, err := b.GetActions(args)
if err != nil {
err := errors.Wrapf(err, "GetCards() failed inside ContainsCopyOf() for board '%s' and card '%s'.", b.ID, cardID)
return false, err
}
for _, action := range actions {
if action.Data != nil && action.Data.CardSource != nil && action.Data.CardSource.ID == cardID {
return true, nil
}
}
return false, nil
}
func (c *Client) GetCard(cardID string, args Arguments) (card *Card, err error) {
path := fmt.Sprintf("cards/%s", cardID)
err = c.Get(path, args, &card)
if card != nil {
card.client = c
}
return card, err
}
/**
* Retrieves all Cards on a Board
*
* If before
*/
func (b *Board) GetCards(args Arguments) (cards []*Card, err error) {
path := fmt.Sprintf("boards/%s/cards", b.ID)
err = b.client.Get(path, args, &cards)
// Naive implementation would return here. To make sure we get all
// cards, we begin
if len(cards) > 0 {
moreCards := true
for moreCards == true {
nextCardBatch := make([]*Card, 0)
args["before"] = EarliestCardID(cards)
err = b.client.Get(path, args, &nextCardBatch)
if len(nextCardBatch) > 0 {
cards = append(cards, nextCardBatch...)
} else {
moreCards = false
}
}
}
for i := range cards {
cards[i].client = b.client
}
return
}
/**
* Retrieves all Cards in a List
*/
func (l *List) GetCards(args Arguments) (cards []*Card, err error) {
path := fmt.Sprintf("lists/%s/cards", l.ID)
err = l.client.Get(path, args, &cards)
for i := range cards {
cards[i].client = l.client
}
return
}
func EarliestCardID(cards []*Card) string {
if len(cards) == 0 {
return ""
}
earliest := cards[0].ID
for _, card := range cards {
if card.ID < earliest {
earliest = card.ID
}
}
return earliest
}

30
vendor/github.com/adlio/trello/checklist.go generated vendored Normal file
View File

@ -0,0 +1,30 @@
// Copyright © 2016 Aaron Longwell
//
// Use of this source code is governed by an MIT licese.
// Details in the LICENSE file.
package trello
type Checklist struct {
ID string `json:"id"`
Name string `json:"name"`
IDBoard string `json:"idBoard,omitempty"`
IDCard string `json:"idCard,omitempty"`
Pos float64 `json:"pos,omitempty"`
CheckItems []CheckItem `json:"checkItems,omitempty"`
}
type CheckItem struct {
ID string `json:"id"`
Name string `json:"name"`
State string `json:"state"`
IDChecklist string `json:"idChecklist,omitempty"`
Pos float64 `json:"pos,omitempty"`
}
// Manifestation of CheckItem when it appears in CheckItemStates
// on a Card.
type CheckItemState struct {
IDCheckItem string `json:"idCheckItem"`
State string `json:"state"`
}

239
vendor/github.com/adlio/trello/client.go generated vendored Normal file
View File

@ -0,0 +1,239 @@
// Copyright © 2016 Aaron Longwell
//
// Use of this source code is governed by an MIT licese.
// Details in the LICENSE file.
package trello
import (
"bytes"
"context"
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
"time"
"github.com/pkg/errors"
)
const DEFAULT_BASEURL = "https://api.trello.com/1"
type Client struct {
Client *http.Client
Logger logger
BaseURL string
Key string
Token string
throttle <-chan time.Time
testMode bool
ctx context.Context
}
type logger interface {
Debugf(string, ...interface{})
}
func NewClient(key, token string) *Client {
return &Client{
Client: http.DefaultClient,
BaseURL: DEFAULT_BASEURL,
Key: key,
Token: token,
throttle: time.Tick(time.Second / 8), // Actually 10/second, but we're extra cautious
testMode: false,
ctx: context.Background(),
}
}
func (c *Client) WithContext(ctx context.Context) *Client {
newC := *c
newC.ctx = ctx
return &newC
}
func (c *Client) Throttle() {
if !c.testMode {
<-c.throttle
}
}
func (c *Client) Get(path string, args Arguments, target interface{}) error {
// Trello prohibits more than 10 seconds/second per token
c.Throttle()
params := args.ToURLValues()
c.log("[trello] GET %s?%s", path, params.Encode())
if c.Key != "" {
params.Set("key", c.Key)
}
if c.Token != "" {
params.Set("token", c.Token)
}
url := fmt.Sprintf("%s/%s", c.BaseURL, path)
urlWithParams := fmt.Sprintf("%s?%s", url, params.Encode())
req, err := http.NewRequest("GET", urlWithParams, nil)
if err != nil {
return errors.Wrapf(err, "Invalid GET request %s", url)
}
req = req.WithContext(c.ctx)
resp, err := c.Client.Do(req)
if err != nil {
return errors.Wrapf(err, "HTTP request failure on %s", url)
}
defer resp.Body.Close()
if resp.StatusCode != 200 {
return makeHttpClientError(url, resp)
}
decoder := json.NewDecoder(resp.Body)
err = decoder.Decode(target)
if err != nil {
return errors.Wrapf(err, "JSON decode failed on %s", url)
}
return nil
}
func (c *Client) Put(path string, args Arguments, target interface{}) error {
// Trello prohibits more than 10 seconds/second per token
c.Throttle()
params := args.ToURLValues()
c.log("[trello] PUT %s?%s", path, params.Encode())
if c.Key != "" {
params.Set("key", c.Key)
}
if c.Token != "" {
params.Set("token", c.Token)
}
url := fmt.Sprintf("%s/%s", c.BaseURL, path)
urlWithParams := fmt.Sprintf("%s?%s", url, params.Encode())
req, err := http.NewRequest("PUT", urlWithParams, nil)
if err != nil {
return errors.Wrapf(err, "Invalid PUT request %s", url)
}
resp, err := c.Client.Do(req)
if err != nil {
return errors.Wrapf(err, "HTTP request failure on %s", url)
}
defer resp.Body.Close()
if resp.StatusCode != 200 {
return makeHttpClientError(url, resp)
}
decoder := json.NewDecoder(resp.Body)
err = decoder.Decode(target)
if err != nil {
return errors.Wrapf(err, "JSON decode failed on %s", url)
}
return nil
}
func (c *Client) Post(path string, args Arguments, target interface{}) error {
// Trello prohibits more than 10 seconds/second per token
c.Throttle()
params := args.ToURLValues()
c.log("[trello] POST %s?%s", path, params.Encode())
if c.Key != "" {
params.Set("key", c.Key)
}
if c.Token != "" {
params.Set("token", c.Token)
}
url := fmt.Sprintf("%s/%s", c.BaseURL, path)
urlWithParams := fmt.Sprintf("%s?%s", url, params.Encode())
req, err := http.NewRequest("POST", urlWithParams, nil)
if err != nil {
return errors.Wrapf(err, "Invalid POST request %s", url)
}
req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
resp, err := c.Client.Do(req)
if err != nil {
return errors.Wrapf(err, "HTTP request failure on %s", url)
}
defer resp.Body.Close()
b, err := ioutil.ReadAll(resp.Body)
if err != nil {
return errors.Wrapf(err, "HTTP Read error on response for %s", url)
}
decoder := json.NewDecoder(bytes.NewBuffer(b))
err = decoder.Decode(target)
if err != nil {
return errors.Wrapf(err, "JSON decode failed on %s:\n%s", url, string(b))
}
return nil
}
func (c *Client) Delete(path string, args Arguments, target interface{}) error {
c.Throttle()
params := args.ToURLValues()
c.log("[trello] DELETE %s?%s", path, params.Encode())
if c.Key != "" {
params.Set("key", c.Key)
}
if c.Token != "" {
params.Set("token", c.Token)
}
url := fmt.Sprintf("%s/%s", c.BaseURL, path)
urlWithParams := fmt.Sprintf("%s?%s", url, params.Encode())
req, err := http.NewRequest("DELETE", urlWithParams, nil)
if err != nil {
return errors.Wrapf(err, "Invalid DELETE request %s", url)
}
resp, err := c.Client.Do(req)
if err != nil {
return errors.Wrapf(err, "HTTP request failure on %s", url)
}
defer resp.Body.Close()
b, err := ioutil.ReadAll(resp.Body)
if err != nil {
return errors.Wrapf(err, "HTTP Read error on response for %s", url)
}
decoder := json.NewDecoder(bytes.NewBuffer(b))
err = decoder.Decode(target)
if err != nil {
return errors.Wrapf(err, "JSON decode failed on %s:\n%s", url, string(b))
}
return nil
}
func (c *Client) log(format string, args ...interface{}) {
if c.Logger != nil {
c.Logger.Debugf(format, args)
}
}

55
vendor/github.com/adlio/trello/errors.go generated vendored Normal file
View File

@ -0,0 +1,55 @@
package trello
import (
"fmt"
"io/ioutil"
"net/http"
)
type notFoundError interface {
IsNotFound() bool
}
type rateLimitError interface {
IsRateLimit() bool
}
type permissionDeniedError interface {
IsPermissionDenied() bool
}
type httpClientError struct {
msg string
code int
}
func makeHttpClientError(url string, resp *http.Response) error {
body, _ := ioutil.ReadAll(resp.Body)
msg := fmt.Sprintf("HTTP request failure on %s:\n%d: %s", url, resp.StatusCode, string(body))
return &httpClientError{
msg: msg,
code: resp.StatusCode,
}
}
func (e *httpClientError) Error() string { return e.msg }
func (e *httpClientError) IsRateLimit() bool { return e.code == 429 }
func (e *httpClientError) IsNotFound() bool { return e.code == 404 }
func (e *httpClientError) IsPermissionDenied() bool { return e.code == 401 }
func IsRateLimit(err error) bool {
re, ok := err.(rateLimitError)
return ok && re.IsRateLimit()
}
func IsNotFound(err error) bool {
nf, ok := err.(notFoundError)
return ok && nf.IsNotFound()
}
func IsPermissionDenied(err error) bool {
pd, ok := err.(permissionDeniedError)
return ok && pd.IsPermissionDenied()
}

14
vendor/github.com/adlio/trello/label.go generated vendored Normal file
View File

@ -0,0 +1,14 @@
// Copyright © 2016 Aaron Longwell
//
// Use of this source code is governed by an MIT licese.
// Details in the LICENSE file.
package trello
type Label struct {
ID string `json:"id"`
IDBoard string `json:"idBoard"`
Name string `json:"name"`
Color string `json:"color"`
Uses int `json:"uses"`
}

9
vendor/github.com/adlio/trello/list-duration-sort.go generated vendored Normal file
View File

@ -0,0 +1,9 @@
package trello
type ByFirstEntered []*ListDuration
func (durs ByFirstEntered) Len() int { return len(durs) }
func (durs ByFirstEntered) Less(i, j int) bool {
return durs[i].FirstEntered.Before(durs[j].FirstEntered)
}
func (durs ByFirstEntered) Swap(i, j int) { durs[i], durs[j] = durs[j], durs[i] }

82
vendor/github.com/adlio/trello/list-duration.go generated vendored Normal file
View File

@ -0,0 +1,82 @@
package trello
import (
"sort"
"time"
"github.com/pkg/errors"
)
type ListDuration struct {
ListID string
ListName string
Duration time.Duration
FirstEntered time.Time
TimesInList int
}
func (l *ListDuration) AddDuration(d time.Duration) {
l.Duration = l.Duration + d
l.TimesInList++
}
// Analytzes a Cards actions to figure out how long it was in each List
func (c *Card) GetListDurations() (durations []*ListDuration, err error) {
var actions ActionCollection
if len(c.Actions) == 0 {
// Get all actions which affected the Card's List
c.client.log("[trello] GetListDurations() called on card '%s' without any Card.Actions. Fetching fresh.", c.ID)
actions, err = c.GetListChangeActions()
if err != nil {
err = errors.Wrap(err, "GetListChangeActions() call failed.")
return
}
} else {
actions = c.Actions.FilterToListChangeActions()
}
return actions.GetListDurations()
}
func (actions ActionCollection) GetListDurations() (durations []*ListDuration, err error) {
sort.Sort(actions)
var prevTime time.Time
var prevList *List
durs := make(map[string]*ListDuration)
for _, action := range actions {
if action.DidChangeListForCard() {
if prevList != nil {
duration := action.Date.Sub(prevTime)
_, durExists := durs[prevList.ID]
if !durExists {
durs[prevList.ID] = &ListDuration{ListID: prevList.ID, ListName: prevList.Name, Duration: duration, TimesInList: 1, FirstEntered: prevTime}
} else {
durs[prevList.ID].AddDuration(duration)
}
}
prevList = ListAfterAction(action)
prevTime = action.Date
}
}
if prevList != nil {
duration := time.Now().Sub(prevTime)
_, durExists := durs[prevList.ID]
if !durExists {
durs[prevList.ID] = &ListDuration{ListID: prevList.ID, ListName: prevList.Name, Duration: duration, TimesInList: 1, FirstEntered: prevTime}
} else {
durs[prevList.ID].AddDuration(duration)
}
}
durations = make([]*ListDuration, 0, len(durs))
for _, ld := range durs {
durations = append(durations, ld)
}
sort.Sort(ByFirstEntered(durations))
return durations, nil
}

51
vendor/github.com/adlio/trello/list.go generated vendored Normal file
View File

@ -0,0 +1,51 @@
// Copyright © 2016 Aaron Longwell
//
// Use of this source code is governed by an MIT licese.
// Details in the LICENSE file.
package trello
import (
"fmt"
"time"
)
type List struct {
client *Client
ID string `json:"id"`
Name string `json:"name"`
IDBoard string `json:"idBoard,omitempty"`
Closed bool `json:"closed"`
Pos float32 `json:"pos,omitempty"`
Board *Board `json:"board,omitempty"`
Cards []*Card `json:"cards,omitempty"`
}
func (l *List) CreatedAt() time.Time {
t, _ := IDToTime(l.ID)
return t
}
func (c *Client) GetList(listID string, args Arguments) (list *List, err error) {
path := fmt.Sprintf("lists/%s", listID)
err = c.Get(path, args, &list)
if list != nil {
list.client = c
for i := range list.Cards {
list.Cards[i].client = c
}
}
return
}
func (b *Board) GetLists(args Arguments) (lists []*List, err error) {
path := fmt.Sprintf("boards/%s/lists", b.ID)
err = b.client.Get(path, args, &lists)
for i := range lists {
lists[i].client = b.client
for j := range lists[i].Cards {
lists[i].Cards[j].client = b.client
}
}
return
}

118
vendor/github.com/adlio/trello/member-duration.go generated vendored Normal file
View File

@ -0,0 +1,118 @@
package trello
import (
"sort"
"time"
"github.com/pkg/errors"
)
// Used to track the periods of time which a user (member) is attached to a card.
//
type MemberDuration struct {
MemberID string
MemberName string
FirstAdded time.Time
Duration time.Duration
active bool
lastAdded time.Time
}
type ByLongestDuration []*MemberDuration
func (d ByLongestDuration) Len() int { return len(d) }
func (d ByLongestDuration) Less(i, j int) bool { return d[i].Duration > d[j].Duration }
func (d ByLongestDuration) Swap(i, j int) { d[i], d[j] = d[j], d[i] }
func (d *MemberDuration) addAsOf(t time.Time) {
d.active = true
if d.FirstAdded.IsZero() {
d.FirstAdded = t
}
d.startTimerAsOf(t)
}
func (d *MemberDuration) startTimerAsOf(t time.Time) {
if d.active {
d.lastAdded = t
}
}
func (d *MemberDuration) removeAsOf(t time.Time) {
d.stopTimerAsOf(t)
d.active = false
d.lastAdded = time.Time{}
}
func (d *MemberDuration) stopTimerAsOf(t time.Time) {
if d.active {
d.Duration = d.Duration + t.Sub(d.lastAdded)
}
}
func (c *Card) GetMemberDurations() (durations []*MemberDuration, err error) {
var actions ActionCollection
if len(c.Actions) == 0 {
c.client.log("[trello] GetMemberDurations() called on card '%s' without any Card.Actions. Fetching fresh.", c.ID)
actions, err = c.GetMembershipChangeActions()
if err != nil {
err = errors.Wrap(err, "GetMembershipChangeActions() call failed.")
return
}
} else {
actions = c.Actions.FilterToCardMembershipChangeActions()
}
return actions.GetMemberDurations()
}
// Similar to GetListDurations(), this function returns a slice of MemberDuration objects,
// which describes the length of time each member was attached to this card. Durations are
// calculated such that being added to a card starts a timer for that member, and being removed
// starts it again (so that if a person is added and removed multiple times, the duration
// captures only the times which they were attached). Archiving the card also stops the timer.
//
func (actions ActionCollection) GetMemberDurations() (durations []*MemberDuration, err error) {
sort.Sort(actions)
durs := make(map[string]*MemberDuration)
for _, action := range actions {
if action.DidChangeCardMembership() {
_, durExists := durs[action.Member.ID]
if !durExists {
switch action.Type {
case "addMemberToCard":
durs[action.Member.ID] = &MemberDuration{MemberID: action.Member.ID, MemberName: action.Member.FullName}
durs[action.Member.ID].addAsOf(action.Date)
case "removeMemberFromCard":
// Surprisingly, this is possible. If a card was copied, and members were preserved, those
// members exist on the card without a corresponding addMemberToCard action.
t, _ := IDToTime(action.Data.Card.ID)
durs[action.Member.ID] = &MemberDuration{MemberID: action.Member.ID, MemberName: action.Member.FullName, lastAdded: t}
durs[action.Member.ID].removeAsOf(action.Date)
}
} else {
switch action.Type {
case "addMemberToCard":
durs[action.Member.ID].addAsOf(action.Date)
case "removeMemberFromCard":
durs[action.Member.ID].removeAsOf(action.Date)
}
}
} else if action.DidArchiveCard() {
for id, _ := range durs {
durs[id].stopTimerAsOf(action.Date)
}
} else if action.DidUnarchiveCard() {
for id, _ := range durs {
durs[id].startTimerAsOf(action.Date)
}
}
}
durations = make([]*MemberDuration, 0, len(durs))
for _, md := range durs {
durations = append(durations, md)
}
// sort.Sort(ByLongestDuration(durations))
return durations, nil
}

56
vendor/github.com/adlio/trello/member.go generated vendored Normal file
View File

@ -0,0 +1,56 @@
// Copyright © 2016 Aaron Longwell
//
// Use of this source code is governed by an MIT licese.
// Details in the LICENSE file.
package trello
import (
"fmt"
)
type Member struct {
client *Client
ID string `json:"id"`
Username string `json:"username"`
FullName string `json:"fullName"`
Initials string `json:"initials"`
AvatarHash string `json:"avatarHash"`
Email string `json:"email"`
}
func (c *Client) GetMember(memberID string, args Arguments) (member *Member, err error) {
path := fmt.Sprintf("members/%s", memberID)
err = c.Get(path, args, &member)
if err == nil {
member.client = c
}
return
}
func (o *Organization) GetMembers(args Arguments) (members []*Member, err error) {
path := fmt.Sprintf("organizations/%s/members", o.ID)
err = o.client.Get(path, args, &members)
for i := range members {
members[i].client = o.client
}
return
}
func (b *Board) GetMembers(args Arguments) (members []*Member, err error) {
path := fmt.Sprintf("boards/%s/members", b.ID)
err = b.client.Get(path, args, &members)
for i := range members {
members[i].client = b.client
}
return
}
func (c *Card) GetMembers(args Arguments) (members []*Member, err error) {
path := fmt.Sprintf("cards/%s/members", c.ID)
err = c.client.Get(path, args, &members)
for i := range members {
members[i].client = c.client
}
return
}

31
vendor/github.com/adlio/trello/organization.go generated vendored Normal file
View File

@ -0,0 +1,31 @@
// Copyright © 2016 Aaron Longwell
//
// Use of this source code is governed by an MIT licese.
// Details in the LICENSE file.
package trello
import (
"fmt"
)
type Organization struct {
client *Client
ID string `json:"id"`
Name string `json:"name"`
DisplayName string `json:"displayName"`
Desc string `json:"desc"`
URL string `json:"url"`
Website string `json:"website"`
Products []string `json:"products"`
PowerUps []string `json:"powerUps"`
}
func (c *Client) GetOrganization(orgID string, args Arguments) (organization *Organization, err error) {
path := fmt.Sprintf("organizations/%s", orgID)
err = c.Get(path, args, &organization)
if organization != nil {
organization.client = c
}
return
}

57
vendor/github.com/adlio/trello/search.go generated vendored Normal file
View File

@ -0,0 +1,57 @@
// Copyright © 2016 Aaron Longwell
//
// Use of this source code is governed by an MIT licese.
// Details in the LICENSE file.
package trello
type SearchResult struct {
Options SearchOptions `json:"options"`
Actions []*Action `json:"actions,omitempty"`
Cards []*Card `json:"cards,omitempty"`
Boards []*Board `json:"boards,omitempty"`
Members []*Member `json:"members,omitempty"`
}
type SearchOptions struct {
Terms []SearchTerm `json:"terms"`
Modifiers []SearchModifier `json:"modifiers,omitempty"`
ModelTypes []string `json:"modelTypes,omitempty"`
Partial bool `json:"partial"`
}
type SearchModifier struct {
Text string `json:"text"`
}
type SearchTerm struct {
Text string `json:"text"`
Negated bool `json:"negated,omitempty"`
}
func (c *Client) SearchCards(query string, args Arguments) (cards []*Card, err error) {
args["query"] = query
args["modelTypes"] = "cards"
res := SearchResult{}
err = c.Get("search", args, &res)
cards = res.Cards
return
}
func (c *Client) SearchBoards(query string, args Arguments) (boards []*Board, err error) {
args["query"] = query
args["modelTypes"] = "boards"
res := SearchResult{}
err = c.Get("search", args, &res)
boards = res.Boards
for _, board := range boards {
board.client = c
}
return
}
func (c *Client) SearchMembers(query string, args Arguments) (members []*Member, err error) {
args["query"] = query
err = c.Get("search/members", args, &members)
return
}

37
vendor/github.com/adlio/trello/token.go generated vendored Normal file
View File

@ -0,0 +1,37 @@
// Copyright © 2016 Aaron Longwell
//
// Use of this source code is governed by an MIT licese.
// Details in the LICENSE file.
package trello
import (
"fmt"
"time"
)
type Token struct {
client *Client
ID string `json:"id"`
DateCreated time.Time `json:"dateCreated"`
DateExpires *time.Time `json:"dateExpires"`
IDMember string `json:"idMember"`
Identifier string `json:"identifier"`
Permissions []Permission `json:"permissions"`
}
type Permission struct {
IDModel string `json:"idModel"`
ModelType string `json:"modelType"`
Read bool `json:"read"`
Write bool `json:"write"`
}
func (c *Client) GetToken(tokenID string, args Arguments) (token *Token, err error) {
path := fmt.Sprintf("tokens/%s", tokenID)
err = c.Get(path, args, &token)
if token != nil {
token.client = c
}
return
}

BIN
vendor/github.com/adlio/trello/trello-logo.png generated vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

27
vendor/github.com/adlio/trello/trello.go generated vendored Normal file
View File

@ -0,0 +1,27 @@
// Copyright © 2016 Aaron Longwell
//
// Use of this source code is governed by an MIT licese.
// Details in the LICENSE file.
package trello
import (
"strconv"
"time"
"github.com/pkg/errors"
)
func IDToTime(id string) (t time.Time, err error) {
if id == "" {
return time.Time{}, nil
}
// The first 8 characters in the object ID are a Unix timestamp
ts, err := strconv.ParseUint(id[:8], 16, 64)
if err != nil {
err = errors.Wrapf(err, "ID '%s' failed to convert to timestamp.", id)
} else {
t = time.Unix(int64(ts), 0)
}
return
}

111
vendor/github.com/adlio/trello/webhook.go generated vendored Normal file
View File

@ -0,0 +1,111 @@
// Copyright © 2016 Aaron Longwell
//
// Use of this source code is governed by an MIT licese.
// Details in the LICENSE file.
package trello
import (
"encoding/json"
"fmt"
"net/http"
"github.com/pkg/errors"
)
// Webhook is the Go representation of a webhook registered in Trello's systems.
// Used when creating, modifying or deleting webhooks.
//
type Webhook struct {
client *Client
ID string `json:"id,omitempty"`
IDModel string `json:"idModel"`
Description string `json:"description"`
CallbackURL string `json:"callbackURL"`
Active bool `json:"active"`
}
// BoardWebhookRequest is the object sent by Trello to a Webhook for Board-triggered
// webhooks.
//
type BoardWebhookRequest struct {
Model *Board
Action *Action
}
// ListWebhookRequest is the object sent by Trello to a Webhook for List-triggered
// webhooks.
//
type ListWebhookRequest struct {
Model *List
Action *Action
}
// CardWebhookRequest is the object sent by Trello to a Webhook for Card-triggered
// webhooks.
//
type CardWebhookRequest struct {
Model *Card
Action *Action
}
func (c *Client) CreateWebhook(webhook *Webhook) error {
path := "webhooks"
args := Arguments{"idModel": webhook.IDModel, "description": webhook.Description, "callbackURL": webhook.CallbackURL}
err := c.Post(path, args, webhook)
if err == nil {
webhook.client = c
}
return err
}
func (c *Client) GetWebhook(webhookID string, args Arguments) (webhook *Webhook, err error) {
path := fmt.Sprintf("webhooks/%s", webhookID)
err = c.Get(path, args, &webhook)
if webhook != nil {
webhook.client = c
}
return
}
func (t *Token) GetWebhooks(args Arguments) (webhooks []*Webhook, err error) {
path := fmt.Sprintf("tokens/%s/webhooks", t.ID)
err = t.client.Get(path, args, &webhooks)
return
}
func GetBoardWebhookRequest(r *http.Request) (whr *BoardWebhookRequest, err error) {
if r.Method == "HEAD" {
return &BoardWebhookRequest{}, nil
}
decoder := json.NewDecoder(r.Body)
err = decoder.Decode(&whr)
if err != nil {
err = errors.Wrapf(err, "GetBoardWebhookRequest() failed to decode '%s'.", r.URL)
}
return
}
func GetListWebhookRequest(r *http.Request) (whr *ListWebhookRequest, err error) {
if r.Method == "HEAD" {
return &ListWebhookRequest{}, nil
}
decoder := json.NewDecoder(r.Body)
err = decoder.Decode(&whr)
if err != nil {
err = errors.Wrapf(err, "GetListWebhookRequest() failed to decode '%s'.", r.URL)
}
return
}
func GetCardWebhookRequest(r *http.Request) (whr *CardWebhookRequest, err error) {
if r.Method == "HEAD" {
return &CardWebhookRequest{}, nil
}
decoder := json.NewDecoder(r.Body)
err = decoder.Decode(&whr)
if err != nil {
err = errors.Wrapf(err, "GetCardWebhookRequest() failed to decode '%s'.", r.URL)
}
return
}

View File

@ -87,29 +87,33 @@ There are a few full examples in the examples directory that can be referenced.
package main package main
import ( import (
"log" "log"
"fmt" "fmt"
"os"
// Shortening the import reference name seems to make it a bit easier // Shortening the import reference name seems to make it a bit easier
owm "github.com/briandowns/openweathermap" owm "github.com/briandowns/openweathermap"
) )
func main() { var apiKey = os.Getenv("OWM_API_KEY")
w, err := owm.NewCurrent("F", "ru") // fahrenheit (imperial) with Russian output
if err != nil {
log.Fatalln(err)
}
w.CurrentByName("Phoenix") func main() {
fmt.Println(w) w, err := owm.NewCurrent("F", "ru", apiKey) // fahrenheit (imperial) with Russian output
if err != nil {
log.Fatalln(err)
}
w.CurrentByName("Phoenix")
fmt.Println(w)
} }
``` ```
### Current Conditions by location name ### Current Conditions by location name
```Go ```Go
func main() { func main() {
w, err := owm.NewCurrent("K", "EN") // (internal - OpenWeatherMap reference for kelvin) with English output w, err := owm.NewCurrent("K", "EN", apiKey) // (internal - OpenWeatherMap reference for kelvin) with English output
if err != nil { if err != nil {
log.Fatalln(err) log.Fatalln(err)
} }
@ -123,16 +127,17 @@ func main() {
```Go ```Go
func main() { func main() {
w, err := owm.NewForecast("F", "FI") w, err := owm.NewForecast("5", "F", "FI", apiKey) // valid options for first parameter are "5" and "16"
if err != nil { if err != nil {
log.Fatalln(err) log.Fatalln(err)
} }
w.DailyByCoordinates( w.DailyByCoordinates(
&Coordinates{ &owm.Coordinates{
Longitude: -112.07, Longitude: -112.07,
Latitude: 33.45, Latitude: 33.45,
}, },
5 // five days forecast
) )
fmt.Println(w) fmt.Println(w)
} }
@ -142,7 +147,7 @@ func main() {
```Go ```Go
func main() { func main() {
w, err := owm.NewCurrent("C", "PL") w, err := owm.NewCurrent("C", "PL", apiKey)
if err != nil { if err != nil {
log.Fatalln(err) log.Fatalln(err)
} }
@ -156,7 +161,7 @@ func main() {
```Go ```Go
func main() { func main() {
w, err := owm.NewCurrent("F", "EN") w, err := owm.NewCurrent("F", "EN", apiKey)
if err != nil { if err != nil {
log.Fatalln(err) log.Fatalln(err)
} }
@ -171,7 +176,7 @@ func main() {
```Go ```Go
func main() { func main() {
client := &http.Client{} client := &http.Client{}
w, err := owm.NewCurrent("F", "EN", owm.WithHttpClient(client)) w, err := owm.NewCurrent("F", "EN", apiKey, owm.WithHttpClient(client))
if err != nil { if err != nil {
log.Fatalln(err) log.Fatalln(err)
} }
@ -182,19 +187,21 @@ func main() {
```Go ```Go
func main() { func main() {
uv, err := NewUV() uv, err := owm.NewUV(apiKey)
if err != nil { if err != nil {
log.Fatalln(err) log.Fatalln(err)
} }
coord := &Coordinates{ coord := &owm.Coordinates{
Longitude: 53.343497, Longitude: 53.343497,
Latitude: -6.288379, Latitude: -6.288379,
} }
if err := uv.Current(coord); err != nil { if err := uv.Current(coord); err != nil {
t.Error(err) log.Fatalln(err)
} }
fmt.Println(coord)
} }
``` ```
@ -202,12 +209,12 @@ func main() {
```Go ```Go
func main() { func main() {
uv, err := NewUV() uv, err := owm.NewUV(apiKey)
if err != nil { if err != nil {
log.Fatalln(err) log.Fatalln(err)
} }
coord := &Coordinates{ coord := &owm.Coordinates{
Longitude: 54.995656, Longitude: 54.995656,
Latitude: -7.326834, Latitude: -7.326834,
} }
@ -225,19 +232,26 @@ func main() {
```Go ```Go
func main() { func main() {
uv, err := NewUV() uv, err := owm.NewUV(apiKey)
if err != nil { if err != nil {
log.Fatalln(err) log.Fatalln(err)
} }
if err := uv.Current(coords); err != nil { coord := &owm.Coordinates{
t.Error(err) Longitude: 53.343497,
Latitude: -6.288379,
}
if err := uv.Current(coord); err != nil {
log.Fatalln(err)
} }
info, err := uv.UVInformation() info, err := uv.UVInformation()
if err != nil { if err != nil {
log.Fatalln(err) log.Fatalln(err)
} }
fmt.Println(info)
} }
``` ```
@ -245,13 +259,13 @@ func main() {
```Go ```Go
func main() { func main() {
pollution, err := NewPollution() pollution, err := owm.NewPollution(apiKey)
if err != nil { if err != nil {
log.Fatalln(err) log.Fatalln(err)
} }
params := &PollutionParameters{ params := &owm.PollutionParameters{
Location: Coordinates{ Location: owm.Coordinates{
Latitude: 0.0, Latitude: 0.0,
Longitude: 10.0, Longitude: 10.0,
}, },

View File

@ -108,7 +108,7 @@ func (s UserStats) String() string {
return Stringify(s) return Stringify(s)
} }
//GistStats represents the number of total, private and public gists. // GistStats represents the number of total, private and public gists.
type GistStats struct { type GistStats struct {
TotalGists *int `json:"total_gists,omitempty"` TotalGists *int `json:"total_gists,omitempty"`
PrivateGists *int `json:"private_gists,omitempty"` PrivateGists *int `json:"private_gists,omitempty"`

24
vendor/github.com/pkg/errors/.gitignore generated vendored Normal file
View File

@ -0,0 +1,24 @@
# Compiled Object files, Static and Dynamic libs (Shared Objects)
*.o
*.a
*.so
# Folders
_obj
_test
# Architecture specific extensions/prefixes
*.[568vq]
[568vq].out
*.cgo1.go
*.cgo2.c
_cgo_defun.c
_cgo_gotypes.go
_cgo_export.*
_testmain.go
*.exe
*.test
*.prof

11
vendor/github.com/pkg/errors/.travis.yml generated vendored Normal file
View File

@ -0,0 +1,11 @@
language: go
go_import_path: github.com/pkg/errors
go:
- 1.4.3
- 1.5.4
- 1.6.2
- 1.7.1
- tip
script:
- go test -v ./...

23
vendor/github.com/pkg/errors/LICENSE generated vendored Normal file
View File

@ -0,0 +1,23 @@
Copyright (c) 2015, Dave Cheney <dave@cheney.net>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

52
vendor/github.com/pkg/errors/README.md generated vendored Normal file
View File

@ -0,0 +1,52 @@
# errors [![Travis-CI](https://travis-ci.org/pkg/errors.svg)](https://travis-ci.org/pkg/errors) [![AppVeyor](https://ci.appveyor.com/api/projects/status/b98mptawhudj53ep/branch/master?svg=true)](https://ci.appveyor.com/project/davecheney/errors/branch/master) [![GoDoc](https://godoc.org/github.com/pkg/errors?status.svg)](http://godoc.org/github.com/pkg/errors) [![Report card](https://goreportcard.com/badge/github.com/pkg/errors)](https://goreportcard.com/report/github.com/pkg/errors)
Package errors provides simple error handling primitives.
`go get github.com/pkg/errors`
The traditional error handling idiom in Go is roughly akin to
```go
if err != nil {
return err
}
```
which applied recursively up the call stack results in error reports without context or debugging information. The errors package allows programmers to add context to the failure path in their code in a way that does not destroy the original value of the error.
## Adding context to an error
The errors.Wrap function returns a new error that adds context to the original error. For example
```go
_, err := ioutil.ReadAll(r)
if err != nil {
return errors.Wrap(err, "read failed")
}
```
## Retrieving the cause of an error
Using `errors.Wrap` constructs a stack of errors, adding context to the preceding error. Depending on the nature of the error it may be necessary to reverse the operation of errors.Wrap to retrieve the original error for inspection. Any error value which implements this interface can be inspected by `errors.Cause`.
```go
type causer interface {
Cause() error
}
```
`errors.Cause` will recursively retrieve the topmost error which does not implement `causer`, which is assumed to be the original cause. For example:
```go
switch err := errors.Cause(err).(type) {
case *MyError:
// handle specifically
default:
// unknown error
}
```
[Read the package documentation for more information](https://godoc.org/github.com/pkg/errors).
## Contributing
We welcome pull requests, bug fixes and issue reports. With that said, the bar for adding new symbols to this package is intentionally set high.
Before proposing a change, please discuss your change by raising an issue.
## Licence
BSD-2-Clause

32
vendor/github.com/pkg/errors/appveyor.yml generated vendored Normal file
View File

@ -0,0 +1,32 @@
version: build-{build}.{branch}
clone_folder: C:\gopath\src\github.com\pkg\errors
shallow_clone: true # for startup speed
environment:
GOPATH: C:\gopath
platform:
- x64
# http://www.appveyor.com/docs/installed-software
install:
# some helpful output for debugging builds
- go version
- go env
# pre-installed MinGW at C:\MinGW is 32bit only
# but MSYS2 at C:\msys64 has mingw64
- set PATH=C:\msys64\mingw64\bin;%PATH%
- gcc --version
- g++ --version
build_script:
- go install -v ./...
test_script:
- set PATH=C:\gopath\bin;%PATH%
- go test -v ./...
#artifacts:
# - path: '%GOPATH%\bin\*.exe'
deploy: off

269
vendor/github.com/pkg/errors/errors.go generated vendored Normal file
View File

@ -0,0 +1,269 @@
// Package errors provides simple error handling primitives.
//
// The traditional error handling idiom in Go is roughly akin to
//
// if err != nil {
// return err
// }
//
// which applied recursively up the call stack results in error reports
// without context or debugging information. The errors package allows
// programmers to add context to the failure path in their code in a way
// that does not destroy the original value of the error.
//
// Adding context to an error
//
// The errors.Wrap function returns a new error that adds context to the
// original error by recording a stack trace at the point Wrap is called,
// and the supplied message. For example
//
// _, err := ioutil.ReadAll(r)
// if err != nil {
// return errors.Wrap(err, "read failed")
// }
//
// If additional control is required the errors.WithStack and errors.WithMessage
// functions destructure errors.Wrap into its component operations of annotating
// an error with a stack trace and an a message, respectively.
//
// Retrieving the cause of an error
//
// Using errors.Wrap constructs a stack of errors, adding context to the
// preceding error. Depending on the nature of the error it may be necessary
// to reverse the operation of errors.Wrap to retrieve the original error
// for inspection. Any error value which implements this interface
//
// type causer interface {
// Cause() error
// }
//
// can be inspected by errors.Cause. errors.Cause will recursively retrieve
// the topmost error which does not implement causer, which is assumed to be
// the original cause. For example:
//
// switch err := errors.Cause(err).(type) {
// case *MyError:
// // handle specifically
// default:
// // unknown error
// }
//
// causer interface is not exported by this package, but is considered a part
// of stable public API.
//
// Formatted printing of errors
//
// All error values returned from this package implement fmt.Formatter and can
// be formatted by the fmt package. The following verbs are supported
//
// %s print the error. If the error has a Cause it will be
// printed recursively
// %v see %s
// %+v extended format. Each Frame of the error's StackTrace will
// be printed in detail.
//
// Retrieving the stack trace of an error or wrapper
//
// New, Errorf, Wrap, and Wrapf record a stack trace at the point they are
// invoked. This information can be retrieved with the following interface.
//
// type stackTracer interface {
// StackTrace() errors.StackTrace
// }
//
// Where errors.StackTrace is defined as
//
// type StackTrace []Frame
//
// The Frame type represents a call site in the stack trace. Frame supports
// the fmt.Formatter interface that can be used for printing information about
// the stack trace of this error. For example:
//
// if err, ok := err.(stackTracer); ok {
// for _, f := range err.StackTrace() {
// fmt.Printf("%+s:%d", f)
// }
// }
//
// stackTracer interface is not exported by this package, but is considered a part
// of stable public API.
//
// See the documentation for Frame.Format for more details.
package errors
import (
"fmt"
"io"
)
// New returns an error with the supplied message.
// New also records the stack trace at the point it was called.
func New(message string) error {
return &fundamental{
msg: message,
stack: callers(),
}
}
// Errorf formats according to a format specifier and returns the string
// as a value that satisfies error.
// Errorf also records the stack trace at the point it was called.
func Errorf(format string, args ...interface{}) error {
return &fundamental{
msg: fmt.Sprintf(format, args...),
stack: callers(),
}
}
// fundamental is an error that has a message and a stack, but no caller.
type fundamental struct {
msg string
*stack
}
func (f *fundamental) Error() string { return f.msg }
func (f *fundamental) Format(s fmt.State, verb rune) {
switch verb {
case 'v':
if s.Flag('+') {
io.WriteString(s, f.msg)
f.stack.Format(s, verb)
return
}
fallthrough
case 's':
io.WriteString(s, f.msg)
case 'q':
fmt.Fprintf(s, "%q", f.msg)
}
}
// WithStack annotates err with a stack trace at the point WithStack was called.
// If err is nil, WithStack returns nil.
func WithStack(err error) error {
if err == nil {
return nil
}
return &withStack{
err,
callers(),
}
}
type withStack struct {
error
*stack
}
func (w *withStack) Cause() error { return w.error }
func (w *withStack) Format(s fmt.State, verb rune) {
switch verb {
case 'v':
if s.Flag('+') {
fmt.Fprintf(s, "%+v", w.Cause())
w.stack.Format(s, verb)
return
}
fallthrough
case 's':
io.WriteString(s, w.Error())
case 'q':
fmt.Fprintf(s, "%q", w.Error())
}
}
// Wrap returns an error annotating err with a stack trace
// at the point Wrap is called, and the supplied message.
// If err is nil, Wrap returns nil.
func Wrap(err error, message string) error {
if err == nil {
return nil
}
err = &withMessage{
cause: err,
msg: message,
}
return &withStack{
err,
callers(),
}
}
// Wrapf returns an error annotating err with a stack trace
// at the point Wrapf is call, and the format specifier.
// If err is nil, Wrapf returns nil.
func Wrapf(err error, format string, args ...interface{}) error {
if err == nil {
return nil
}
err = &withMessage{
cause: err,
msg: fmt.Sprintf(format, args...),
}
return &withStack{
err,
callers(),
}
}
// WithMessage annotates err with a new message.
// If err is nil, WithMessage returns nil.
func WithMessage(err error, message string) error {
if err == nil {
return nil
}
return &withMessage{
cause: err,
msg: message,
}
}
type withMessage struct {
cause error
msg string
}
func (w *withMessage) Error() string { return w.msg + ": " + w.cause.Error() }
func (w *withMessage) Cause() error { return w.cause }
func (w *withMessage) Format(s fmt.State, verb rune) {
switch verb {
case 'v':
if s.Flag('+') {
fmt.Fprintf(s, "%+v\n", w.Cause())
io.WriteString(s, w.msg)
return
}
fallthrough
case 's', 'q':
io.WriteString(s, w.Error())
}
}
// Cause returns the underlying cause of the error, if possible.
// An error value has a cause if it implements the following
// interface:
//
// type causer interface {
// Cause() error
// }
//
// If the error does not implement Cause, the original error will
// be returned. If the error is nil, nil will be returned without further
// investigation.
func Cause(err error) error {
type causer interface {
Cause() error
}
for err != nil {
cause, ok := err.(causer)
if !ok {
break
}
err = cause.Cause()
}
return err
}

178
vendor/github.com/pkg/errors/stack.go generated vendored Normal file
View File

@ -0,0 +1,178 @@
package errors
import (
"fmt"
"io"
"path"
"runtime"
"strings"
)
// Frame represents a program counter inside a stack frame.
type Frame uintptr
// pc returns the program counter for this frame;
// multiple frames may have the same PC value.
func (f Frame) pc() uintptr { return uintptr(f) - 1 }
// file returns the full path to the file that contains the
// function for this Frame's pc.
func (f Frame) file() string {
fn := runtime.FuncForPC(f.pc())
if fn == nil {
return "unknown"
}
file, _ := fn.FileLine(f.pc())
return file
}
// line returns the line number of source code of the
// function for this Frame's pc.
func (f Frame) line() int {
fn := runtime.FuncForPC(f.pc())
if fn == nil {
return 0
}
_, line := fn.FileLine(f.pc())
return line
}
// Format formats the frame according to the fmt.Formatter interface.
//
// %s source file
// %d source line
// %n function name
// %v equivalent to %s:%d
//
// Format accepts flags that alter the printing of some verbs, as follows:
//
// %+s path of source file relative to the compile time GOPATH
// %+v equivalent to %+s:%d
func (f Frame) Format(s fmt.State, verb rune) {
switch verb {
case 's':
switch {
case s.Flag('+'):
pc := f.pc()
fn := runtime.FuncForPC(pc)
if fn == nil {
io.WriteString(s, "unknown")
} else {
file, _ := fn.FileLine(pc)
fmt.Fprintf(s, "%s\n\t%s", fn.Name(), file)
}
default:
io.WriteString(s, path.Base(f.file()))
}
case 'd':
fmt.Fprintf(s, "%d", f.line())
case 'n':
name := runtime.FuncForPC(f.pc()).Name()
io.WriteString(s, funcname(name))
case 'v':
f.Format(s, 's')
io.WriteString(s, ":")
f.Format(s, 'd')
}
}
// StackTrace is stack of Frames from innermost (newest) to outermost (oldest).
type StackTrace []Frame
func (st StackTrace) Format(s fmt.State, verb rune) {
switch verb {
case 'v':
switch {
case s.Flag('+'):
for _, f := range st {
fmt.Fprintf(s, "\n%+v", f)
}
case s.Flag('#'):
fmt.Fprintf(s, "%#v", []Frame(st))
default:
fmt.Fprintf(s, "%v", []Frame(st))
}
case 's':
fmt.Fprintf(s, "%s", []Frame(st))
}
}
// stack represents a stack of program counters.
type stack []uintptr
func (s *stack) Format(st fmt.State, verb rune) {
switch verb {
case 'v':
switch {
case st.Flag('+'):
for _, pc := range *s {
f := Frame(pc)
fmt.Fprintf(st, "\n%+v", f)
}
}
}
}
func (s *stack) StackTrace() StackTrace {
f := make([]Frame, len(*s))
for i := 0; i < len(f); i++ {
f[i] = Frame((*s)[i])
}
return f
}
func callers() *stack {
const depth = 32
var pcs [depth]uintptr
n := runtime.Callers(3, pcs[:])
var st stack = pcs[0:n]
return &st
}
// funcname removes the path prefix component of a function's name reported by func.Name().
func funcname(name string) string {
i := strings.LastIndex(name, "/")
name = name[i+1:]
i = strings.Index(name, ".")
return name[i+1:]
}
func trimGOPATH(name, file string) string {
// Here we want to get the source file path relative to the compile time
// GOPATH. As of Go 1.6.x there is no direct way to know the compiled
// GOPATH at runtime, but we can infer the number of path segments in the
// GOPATH. We note that fn.Name() returns the function name qualified by
// the import path, which does not include the GOPATH. Thus we can trim
// segments from the beginning of the file path until the number of path
// separators remaining is one more than the number of path separators in
// the function name. For example, given:
//
// GOPATH /home/user
// file /home/user/src/pkg/sub/file.go
// fn.Name() pkg/sub.Type.Method
//
// We want to produce:
//
// pkg/sub/file.go
//
// From this we can easily see that fn.Name() has one less path separator
// than our desired output. We count separators from the end of the file
// path until it finds two more than in the function name and then move
// one character forward to preserve the initial path segment without a
// leading separator.
const sep = "/"
goal := strings.Count(name, sep) + 2
i := len(file)
for n := 0; n < goal; n++ {
i = strings.LastIndex(file[:i], sep)
if i == -1 {
// not enough separators found, set i so that the slice expression
// below leaves file unmodified
i = -len(sep)
break
}
}
// get back to 0 or trim the leading separator
file = file[i+len(sep):]
return file
}

45
vendor/github.com/rivo/tview/borders.go generated vendored Normal file
View File

@ -0,0 +1,45 @@
package tview
// Borders defines various borders used when primitives are drawn.
// These may be changed to accommodate a different look and feel.
var Borders = struct {
Horizontal rune
Vertical rune
TopLeft rune
TopRight rune
BottomLeft rune
BottomRight rune
LeftT rune
RightT rune
TopT rune
BottomT rune
Cross rune
HorizontalFocus rune
VerticalFocus rune
TopLeftFocus rune
TopRightFocus rune
BottomLeftFocus rune
BottomRightFocus rune
}{
Horizontal: BoxDrawingsLightHorizontal,
Vertical: BoxDrawingsLightVertical,
TopLeft: BoxDrawingsLightDownAndRight,
TopRight: BoxDrawingsLightDownAndLeft,
BottomLeft: BoxDrawingsLightUpAndRight,
BottomRight: BoxDrawingsLightUpAndLeft,
LeftT: BoxDrawingsLightVerticalAndRight,
RightT: BoxDrawingsLightVerticalAndLeft,
TopT: BoxDrawingsLightDownAndHorizontal,
BottomT: BoxDrawingsLightUpAndHorizontal,
Cross: BoxDrawingsLightVerticalAndHorizontal,
HorizontalFocus: BoxDrawingsDoubleHorizontal,
VerticalFocus: BoxDrawingsDoubleVertical,
TopLeftFocus: BoxDrawingsDoubleDownAndRight,
TopRightFocus: BoxDrawingsDoubleDownAndLeft,
BottomLeftFocus: BoxDrawingsDoubleUpAndRight,
BottomRightFocus: BoxDrawingsDoubleUpAndLeft,
}

34
vendor/github.com/rivo/tview/box.go generated vendored
View File

@ -236,27 +236,27 @@ func (b *Box) Draw(screen tcell.Screen) {
border := background.Foreground(b.borderColor) border := background.Foreground(b.borderColor)
var vertical, horizontal, topLeft, topRight, bottomLeft, bottomRight rune var vertical, horizontal, topLeft, topRight, bottomLeft, bottomRight rune
if b.focus.HasFocus() { if b.focus.HasFocus() {
vertical = GraphicsDbVertBar horizontal = Borders.HorizontalFocus
horizontal = GraphicsDbHorBar vertical = Borders.VerticalFocus
topLeft = GraphicsDbTopLeftCorner topLeft = Borders.TopLeftFocus
topRight = GraphicsDbTopRightCorner topRight = Borders.TopRightFocus
bottomLeft = GraphicsDbBottomLeftCorner bottomLeft = Borders.BottomLeftFocus
bottomRight = GraphicsDbBottomRightCorner bottomRight = Borders.BottomRightFocus
} else { } else {
vertical = GraphicsHoriBar horizontal = Borders.Horizontal
horizontal = GraphicsVertBar vertical = Borders.Vertical
topLeft = GraphicsTopLeftCorner topLeft = Borders.TopLeft
topRight = GraphicsTopRightCorner topRight = Borders.TopRight
bottomLeft = GraphicsBottomLeftCorner bottomLeft = Borders.BottomLeft
bottomRight = GraphicsBottomRightCorner bottomRight = Borders.BottomRight
} }
for x := b.x + 1; x < b.x+b.width-1; x++ { for x := b.x + 1; x < b.x+b.width-1; x++ {
screen.SetContent(x, b.y, vertical, nil, border) screen.SetContent(x, b.y, horizontal, nil, border)
screen.SetContent(x, b.y+b.height-1, vertical, nil, border) screen.SetContent(x, b.y+b.height-1, horizontal, nil, border)
} }
for y := b.y + 1; y < b.y+b.height-1; y++ { for y := b.y + 1; y < b.y+b.height-1; y++ {
screen.SetContent(b.x, y, horizontal, nil, border) screen.SetContent(b.x, y, vertical, nil, border)
screen.SetContent(b.x+b.width-1, y, horizontal, nil, border) screen.SetContent(b.x+b.width-1, y, vertical, nil, border)
} }
screen.SetContent(b.x, b.y, topLeft, nil, border) screen.SetContent(b.x, b.y, topLeft, nil, border)
screen.SetContent(b.x+b.width-1, b.y, topRight, nil, border) screen.SetContent(b.x+b.width-1, b.y, topRight, nil, border)
@ -269,7 +269,7 @@ func (b *Box) Draw(screen tcell.Screen) {
if StringWidth(b.title)-printed > 0 && printed > 0 { if StringWidth(b.title)-printed > 0 && printed > 0 {
_, _, style, _ := screen.GetContent(b.x+b.width-2, b.y) _, _, style, _ := screen.GetContent(b.x+b.width-2, b.y)
fg, _, _ := style.Decompose() fg, _, _ := style.Decompose()
Print(screen, string(GraphicsEllipsis), b.x+b.width-2, b.y, 1, AlignLeft, fg) Print(screen, string(SemigraphicsHorizontalEllipsis), b.x+b.width-2, b.y, 1, AlignLeft, fg)
} }
} }
} }

17
vendor/github.com/rivo/tview/flex.go generated vendored
View File

@ -28,7 +28,7 @@ type Flex struct {
*Box *Box
// The items to be positioned. // The items to be positioned.
items []flexItem items []*flexItem
// FlexRow or FlexColumn. // FlexRow or FlexColumn.
direction int direction int
@ -86,7 +86,7 @@ func (f *Flex) SetFullScreen(fullScreen bool) *Flex {
// You can provide a nil value for the primitive. This will still consume screen // You can provide a nil value for the primitive. This will still consume screen
// space but nothing will be drawn. // space but nothing will be drawn.
func (f *Flex) AddItem(item Primitive, fixedSize, proportion int, focus bool) *Flex { func (f *Flex) AddItem(item Primitive, fixedSize, proportion int, focus bool) *Flex {
f.items = append(f.items, flexItem{Item: item, FixedSize: fixedSize, Proportion: proportion, Focus: focus}) f.items = append(f.items, &flexItem{Item: item, FixedSize: fixedSize, Proportion: proportion, Focus: focus})
return f return f
} }
@ -101,6 +101,19 @@ func (f *Flex) RemoveItem(p Primitive) *Flex {
return f return f
} }
// ResizeItem sets a new size for the item(s) with the given primitive. If there
// are multiple Flex items with the same primitive, they will all receive the
// same size. For details regarding the size parameters, see AddItem().
func (f *Flex) ResizeItem(p Primitive, fixedSize, proportion int) *Flex {
for _, item := range f.items {
if item.Item == p {
item.FixedSize = fixedSize
item.Proportion = proportion
}
}
return f
}
// Draw draws this primitive onto the screen. // Draw draws this primitive onto the screen.
func (f *Flex) Draw(screen tcell.Screen) { func (f *Flex) Draw(screen tcell.Screen) {
f.Box.Draw(screen) f.Box.Draw(screen)

16
vendor/github.com/rivo/tview/grid.go generated vendored
View File

@ -590,11 +590,11 @@ func (g *Grid) Draw(screen tcell.Screen) {
} }
by := item.y - 1 by := item.y - 1
if by >= 0 && by < height { if by >= 0 && by < height {
PrintJoinedBorder(screen, x+bx, y+by, GraphicsHoriBar, g.bordersColor) PrintJoinedSemigraphics(screen, x+bx, y+by, Borders.Horizontal, g.bordersColor)
} }
by = item.y + item.h by = item.y + item.h
if by >= 0 && by < height { if by >= 0 && by < height {
PrintJoinedBorder(screen, x+bx, y+by, GraphicsHoriBar, g.bordersColor) PrintJoinedSemigraphics(screen, x+bx, y+by, Borders.Horizontal, g.bordersColor)
} }
} }
for by := item.y; by < item.y+item.h; by++ { // Left/right lines. for by := item.y; by < item.y+item.h; by++ { // Left/right lines.
@ -603,28 +603,28 @@ func (g *Grid) Draw(screen tcell.Screen) {
} }
bx := item.x - 1 bx := item.x - 1
if bx >= 0 && bx < width { if bx >= 0 && bx < width {
PrintJoinedBorder(screen, x+bx, y+by, GraphicsVertBar, g.bordersColor) PrintJoinedSemigraphics(screen, x+bx, y+by, Borders.Vertical, g.bordersColor)
} }
bx = item.x + item.w bx = item.x + item.w
if bx >= 0 && bx < width { if bx >= 0 && bx < width {
PrintJoinedBorder(screen, x+bx, y+by, GraphicsVertBar, g.bordersColor) PrintJoinedSemigraphics(screen, x+bx, y+by, Borders.Vertical, g.bordersColor)
} }
} }
bx, by := item.x-1, item.y-1 // Top-left corner. bx, by := item.x-1, item.y-1 // Top-left corner.
if bx >= 0 && bx < width && by >= 0 && by < height { if bx >= 0 && bx < width && by >= 0 && by < height {
PrintJoinedBorder(screen, x+bx, y+by, GraphicsTopLeftCorner, g.bordersColor) PrintJoinedSemigraphics(screen, x+bx, y+by, Borders.TopLeft, g.bordersColor)
} }
bx, by = item.x+item.w, item.y-1 // Top-right corner. bx, by = item.x+item.w, item.y-1 // Top-right corner.
if bx >= 0 && bx < width && by >= 0 && by < height { if bx >= 0 && bx < width && by >= 0 && by < height {
PrintJoinedBorder(screen, x+bx, y+by, GraphicsTopRightCorner, g.bordersColor) PrintJoinedSemigraphics(screen, x+bx, y+by, Borders.TopRight, g.bordersColor)
} }
bx, by = item.x-1, item.y+item.h // Bottom-left corner. bx, by = item.x-1, item.y+item.h // Bottom-left corner.
if bx >= 0 && bx < width && by >= 0 && by < height { if bx >= 0 && bx < width && by >= 0 && by < height {
PrintJoinedBorder(screen, x+bx, y+by, GraphicsBottomLeftCorner, g.bordersColor) PrintJoinedSemigraphics(screen, x+bx, y+by, Borders.BottomLeft, g.bordersColor)
} }
bx, by = item.x+item.w, item.y+item.h // Bottom-right corner. bx, by = item.x+item.w, item.y+item.h // Bottom-right corner.
if bx >= 0 && bx < width && by >= 0 && by < height { if bx >= 0 && bx < width && by >= 0 && by < height {
PrintJoinedBorder(screen, x+bx, y+by, GraphicsBottomRightCorner, g.bordersColor) PrintJoinedSemigraphics(screen, x+bx, y+by, Borders.BottomRight, g.bordersColor)
} }
} }
} }

296
vendor/github.com/rivo/tview/semigraphics.go generated vendored Normal file
View File

@ -0,0 +1,296 @@
package tview
import "github.com/gdamore/tcell"
// Semigraphics provides an easy way to access unicode characters for drawing.
//
// Named like the unicode characters, 'Semigraphics'-prefix used if unicode block
// isn't prefixed itself.
const (
// Block: General Punctation U+2000-U+206F (http://unicode.org/charts/PDF/U2000.pdf)
SemigraphicsHorizontalEllipsis rune = '\u2026' // …
// Block: Box Drawing U+2500-U+257F (http://unicode.org/charts/PDF/U2500.pdf)
BoxDrawingsLightHorizontal rune = '\u2500' // ─
BoxDrawingsHeavyHorizontal rune = '\u2501' // ━
BoxDrawingsLightVertical rune = '\u2502' // │
BoxDrawingsHeavyVertical rune = '\u2503' // ┃
BoxDrawingsLightTripleDashHorizontal rune = '\u2504' // ┄
BoxDrawingsHeavyTripleDashHorizontal rune = '\u2505' // ┅
BoxDrawingsLightTripleDashVertical rune = '\u2506' // ┆
BoxDrawingsHeavyTripleDashVertical rune = '\u2507' // ┇
BoxDrawingsLightQuadrupleDashHorizontal rune = '\u2508' // ┈
BoxDrawingsHeavyQuadrupleDashHorizontal rune = '\u2509' // ┉
BoxDrawingsLightQuadrupleDashVertical rune = '\u250a' // ┊
BoxDrawingsHeavyQuadrupleDashVertical rune = '\u250b' // ┋
BoxDrawingsLightDownAndRight rune = '\u250c' // ┌
BoxDrawingsDownLighAndRightHeavy rune = '\u250d' // ┍
BoxDrawingsDownHeavyAndRightLight rune = '\u250e' // ┎
BoxDrawingsHeavyDownAndRight rune = '\u250f' // ┏
BoxDrawingsLightDownAndLeft rune = '\u2510' // ┐
BoxDrawingsDownLighAndLeftHeavy rune = '\u2511' // ┑
BoxDrawingsDownHeavyAndLeftLight rune = '\u2512' // ┒
BoxDrawingsHeavyDownAndLeft rune = '\u2513' // ┓
BoxDrawingsLightUpAndRight rune = '\u2514' // └
BoxDrawingsUpLightAndRightHeavy rune = '\u2515' // ┕
BoxDrawingsUpHeavyAndRightLight rune = '\u2516' // ┖
BoxDrawingsHeavyUpAndRight rune = '\u2517' // ┗
BoxDrawingsLightUpAndLeft rune = '\u2518' // ┘
BoxDrawingsUpLightAndLeftHeavy rune = '\u2519' // ┙
BoxDrawingsUpHeavyAndLeftLight rune = '\u251a' // ┚
BoxDrawingsHeavyUpAndLeft rune = '\u251b' // ┛
BoxDrawingsLightVerticalAndRight rune = '\u251c' // ├
BoxDrawingsVerticalLightAndRightHeavy rune = '\u251d' // ┝
BoxDrawingsUpHeavyAndRightDownLight rune = '\u251e' // ┞
BoxDrawingsDownHeacyAndRightUpLight rune = '\u251f' // ┟
BoxDrawingsVerticalHeavyAndRightLight rune = '\u2520' // ┠
BoxDrawingsDownLightAnbdRightUpHeavy rune = '\u2521' // ┡
BoxDrawingsUpLightAndRightDownHeavy rune = '\u2522' // ┢
BoxDrawingsHeavyVerticalAndRight rune = '\u2523' // ┣
BoxDrawingsLightVerticalAndLeft rune = '\u2524' // ┤
BoxDrawingsVerticalLightAndLeftHeavy rune = '\u2525' // ┥
BoxDrawingsUpHeavyAndLeftDownLight rune = '\u2526' // ┦
BoxDrawingsDownHeavyAndLeftUpLight rune = '\u2527' // ┧
BoxDrawingsVerticalheavyAndLeftLight rune = '\u2528' // ┨
BoxDrawingsDownLightAndLeftUpHeavy rune = '\u2529' // ┨
BoxDrawingsUpLightAndLeftDownHeavy rune = '\u252a' // ┪
BoxDrawingsHeavyVerticalAndLeft rune = '\u252b' // ┫
BoxDrawingsLightDownAndHorizontal rune = '\u252c' // ┬
BoxDrawingsLeftHeavyAndRightDownLight rune = '\u252d' // ┭
BoxDrawingsRightHeavyAndLeftDownLight rune = '\u252e' // ┮
BoxDrawingsDownLightAndHorizontalHeavy rune = '\u252f' // ┯
BoxDrawingsDownHeavyAndHorizontalLight rune = '\u2530' // ┰
BoxDrawingsRightLightAndLeftDownHeavy rune = '\u2531' // ┱
BoxDrawingsLeftLightAndRightDownHeavy rune = '\u2532' // ┲
BoxDrawingsHeavyDownAndHorizontal rune = '\u2533' // ┳
BoxDrawingsLightUpAndHorizontal rune = '\u2534' // ┴
BoxDrawingsLeftHeavyAndRightUpLight rune = '\u2535' // ┵
BoxDrawingsRightHeavyAndLeftUpLight rune = '\u2536' // ┶
BoxDrawingsUpLightAndHorizontalHeavy rune = '\u2537' // ┷
BoxDrawingsUpHeavyAndHorizontalLight rune = '\u2538' // ┸
BoxDrawingsRightLightAndLeftUpHeavy rune = '\u2539' // ┹
BoxDrawingsLeftLightAndRightUpHeavy rune = '\u253a' // ┺
BoxDrawingsHeavyUpAndHorizontal rune = '\u253b' // ┻
BoxDrawingsLightVerticalAndHorizontal rune = '\u253c' // ┼
BoxDrawingsLeftHeavyAndRightVerticalLight rune = '\u253d' // ┽
BoxDrawingsRightHeavyAndLeftVerticalLight rune = '\u253e' // ┾
BoxDrawingsVerticalLightAndHorizontalHeavy rune = '\u253f' // ┿
BoxDrawingsUpHeavyAndDownHorizontalLight rune = '\u2540' // ╀
BoxDrawingsDownHeavyAndUpHorizontalLight rune = '\u2541' // ╁
BoxDrawingsVerticalHeavyAndHorizontalLight rune = '\u2542' // ╂
BoxDrawingsLeftUpHeavyAndRightDownLight rune = '\u2543' // ╃
BoxDrawingsRightUpHeavyAndLeftDownLight rune = '\u2544' // ╄
BoxDrawingsLeftDownHeavyAndRightUpLight rune = '\u2545' // ╅
BoxDrawingsRightDownHeavyAndLeftUpLight rune = '\u2546' // ╆
BoxDrawingsDownLightAndUpHorizontalHeavy rune = '\u2547' // ╇
BoxDrawingsUpLightAndDownHorizontalHeavy rune = '\u2548' // ╈
BoxDrawingsRightLightAndLeftVerticalHeavy rune = '\u2549' // ╉
BoxDrawingsLeftLightAndRightVerticalHeavy rune = '\u254a' // ╊
BoxDrawingsHeavyVerticalAndHorizontal rune = '\u254b' // ╋
BoxDrawingsLightDoubleDashHorizontal rune = '\u254c' // ╌
BoxDrawingsHeavyDoubleDashHorizontal rune = '\u254d' // ╍
BoxDrawingsLightDoubleDashVertical rune = '\u254e' // ╎
BoxDrawingsHeavyDoubleDashVertical rune = '\u254f' // ╏
BoxDrawingsDoubleHorizontal rune = '\u2550' // ═
BoxDrawingsDoubleVertical rune = '\u2551' // ║
BoxDrawingsDownSingleAndRightDouble rune = '\u2552' // ╒
BoxDrawingsDownDoubleAndRightSingle rune = '\u2553' // ╓
BoxDrawingsDoubleDownAndRight rune = '\u2554' // ╔
BoxDrawingsDownSingleAndLeftDouble rune = '\u2555' // ╕
BoxDrawingsDownDoubleAndLeftSingle rune = '\u2556' // ╖
BoxDrawingsDoubleDownAndLeft rune = '\u2557' // ╗
BoxDrawingsUpSingleAndRightDouble rune = '\u2558' // ╘
BoxDrawingsUpDoubleAndRightSingle rune = '\u2559' // ╙
BoxDrawingsDoubleUpAndRight rune = '\u255a' // ╚
BoxDrawingsUpSingleAndLeftDouble rune = '\u255b' // ╛
BoxDrawingsUpDobuleAndLeftSingle rune = '\u255c' // ╜
BoxDrawingsDoubleUpAndLeft rune = '\u255d' // ╝
BoxDrawingsVerticalSingleAndRightDouble rune = '\u255e' // ╞
BoxDrawingsVerticalDoubleAndRightSingle rune = '\u255f' // ╟
BoxDrawingsDoubleVerticalAndRight rune = '\u2560' // ╠
BoxDrawingsVerticalSingleAndLeftDouble rune = '\u2561' // ╡
BoxDrawingsVerticalDoubleAndLeftSingle rune = '\u2562' // ╢
BoxDrawingsDoubleVerticalAndLeft rune = '\u2563' // ╣
BoxDrawingsDownSingleAndHorizontalDouble rune = '\u2564' // ╤
BoxDrawingsDownDoubleAndHorizontalSingle rune = '\u2565' // ╥
BoxDrawingsDoubleDownAndHorizontal rune = '\u2566' // ╦
BoxDrawingsUpSingleAndHorizontalDouble rune = '\u2567' // ╧
BoxDrawingsUpDoubleAndHorizontalSingle rune = '\u2568' // ╨
BoxDrawingsDoubleUpAndHorizontal rune = '\u2569' // ╩
BoxDrawingsVerticalSingleAndHorizontalDouble rune = '\u256a' // ╪
BoxDrawingsVerticalDoubleAndHorizontalSingle rune = '\u256b' // ╫
BoxDrawingsDoubleVerticalAndHorizontal rune = '\u256c' // ╬
BoxDrawingsLightArcDownAndRight rune = '\u256d' // ╭
BoxDrawingsLightArcDownAndLeft rune = '\u256e' // ╮
BoxDrawingsLightArcUpAndLeft rune = '\u256f' // ╯
BoxDrawingsLightArcUpAndRight rune = '\u2570' // ╰
BoxDrawingsLightDiagonalUpperRightToLowerLeft rune = '\u2571' //
BoxDrawingsLightDiagonalUpperLeftToLowerRight rune = '\u2572' // ╲
BoxDrawingsLightDiagonalCross rune = '\u2573' //
BoxDrawingsLightLeft rune = '\u2574' // ╴
BoxDrawingsLightUp rune = '\u2575' // ╵
BoxDrawingsLightRight rune = '\u2576' // ╶
BoxDrawingsLightDown rune = '\u2577' // ╷
BoxDrawingsHeavyLeft rune = '\u2578' // ╸
BoxDrawingsHeavyUp rune = '\u2579' // ╹
BoxDrawingsHeavyRight rune = '\u257a' // ╺
BoxDrawingsHeavyDown rune = '\u257b' // ╻
BoxDrawingsLightLeftAndHeavyRight rune = '\u257c' // ╼
BoxDrawingsLightUpAndHeavyDown rune = '\u257d' // ╽
BoxDrawingsHeavyLeftAndLightRight rune = '\u257e' // ╾
BoxDrawingsHeavyUpAndLightDown rune = '\u257f' // ╿
)
// SemigraphicJoints is a map for joining semigraphic (or otherwise) runes.
// So far only light lines are supported but if you want to change the border
// styling you need to provide the joints, too.
// The matching will be sorted ascending by rune value, so you don't need to
// provide all rune combinations,
// e.g. (─) + (│) = (┼) will also match (│) + (─) = (┼)
var SemigraphicJoints = map[string]rune{
// (─) + (│) = (┼)
string([]rune{BoxDrawingsLightHorizontal, BoxDrawingsLightVertical}): BoxDrawingsLightVerticalAndHorizontal,
// (─) + (┌) = (┬)
string([]rune{BoxDrawingsLightHorizontal, BoxDrawingsLightDownAndRight}): BoxDrawingsLightDownAndHorizontal,
// (─) + (┐) = (┬)
string([]rune{BoxDrawingsLightHorizontal, BoxDrawingsLightDownAndLeft}): BoxDrawingsLightDownAndHorizontal,
// (─) + (└) = (┴)
string([]rune{BoxDrawingsLightHorizontal, BoxDrawingsLightUpAndRight}): BoxDrawingsLightUpAndHorizontal,
// (─) + (┘) = (┴)
string([]rune{BoxDrawingsLightHorizontal, BoxDrawingsLightUpAndLeft}): BoxDrawingsLightUpAndHorizontal,
// (─) + (├) = (┼)
string([]rune{BoxDrawingsLightHorizontal, BoxDrawingsLightVerticalAndRight}): BoxDrawingsLightVerticalAndHorizontal,
// (─) + (┤) = (┼)
string([]rune{BoxDrawingsLightHorizontal, BoxDrawingsLightVerticalAndLeft}): BoxDrawingsLightVerticalAndHorizontal,
// (─) + (┬) = (┬)
string([]rune{BoxDrawingsLightHorizontal, BoxDrawingsLightDownAndHorizontal}): BoxDrawingsLightDownAndHorizontal,
// (─) + (┴) = (┴)
string([]rune{BoxDrawingsLightHorizontal, BoxDrawingsLightUpAndHorizontal}): BoxDrawingsLightUpAndHorizontal,
// (─) + (┼) = (┼)
string([]rune{BoxDrawingsLightHorizontal, BoxDrawingsLightVerticalAndHorizontal}): BoxDrawingsLightVerticalAndHorizontal,
// (│) + (┌) = (├)
string([]rune{BoxDrawingsLightVertical, BoxDrawingsLightDownAndRight}): BoxDrawingsLightVerticalAndRight,
// (│) + (┐) = (┤)
string([]rune{BoxDrawingsLightVertical, BoxDrawingsLightDownAndLeft}): BoxDrawingsLightVerticalAndLeft,
// (│) + (└) = (├)
string([]rune{BoxDrawingsLightVertical, BoxDrawingsLightUpAndRight}): BoxDrawingsLightVerticalAndRight,
// (│) + (┘) = (┤)
string([]rune{BoxDrawingsLightVertical, BoxDrawingsLightUpAndLeft}): BoxDrawingsLightVerticalAndLeft,
// (│) + (├) = (├)
string([]rune{BoxDrawingsLightVertical, BoxDrawingsLightVerticalAndRight}): BoxDrawingsLightVerticalAndRight,
// (│) + (┤) = (┤)
string([]rune{BoxDrawingsLightVertical, BoxDrawingsLightVerticalAndLeft}): BoxDrawingsLightVerticalAndLeft,
// (│) + (┬) = (┼)
string([]rune{BoxDrawingsLightVertical, BoxDrawingsLightDownAndHorizontal}): BoxDrawingsLightVerticalAndHorizontal,
// (│) + (┴) = (┼)
string([]rune{BoxDrawingsLightVertical, BoxDrawingsLightUpAndHorizontal}): BoxDrawingsLightVerticalAndHorizontal,
// (│) + (┼) = (┼)
string([]rune{BoxDrawingsLightVertical, BoxDrawingsLightVerticalAndHorizontal}): BoxDrawingsLightVerticalAndHorizontal,
// (┌) + (┐) = (┬)
string([]rune{BoxDrawingsLightDownAndRight, BoxDrawingsLightDownAndLeft}): BoxDrawingsLightDownAndHorizontal,
// (┌) + (└) = (├)
string([]rune{BoxDrawingsLightDownAndRight, BoxDrawingsLightUpAndRight}): BoxDrawingsLightVerticalAndRight,
// (┌) + (┘) = (┼)
string([]rune{BoxDrawingsLightDownAndRight, BoxDrawingsLightUpAndLeft}): BoxDrawingsLightVerticalAndHorizontal,
// (┌) + (├) = (├)
string([]rune{BoxDrawingsLightDownAndRight, BoxDrawingsLightVerticalAndRight}): BoxDrawingsLightVerticalAndRight,
// (┌) + (┤) = (┼)
string([]rune{BoxDrawingsLightDownAndRight, BoxDrawingsLightVerticalAndLeft}): BoxDrawingsLightVerticalAndHorizontal,
// (┌) + (┬) = (┬)
string([]rune{BoxDrawingsLightDownAndRight, BoxDrawingsLightDownAndHorizontal}): BoxDrawingsLightDownAndHorizontal,
// (┌) + (┴) = (┼)
string([]rune{BoxDrawingsLightDownAndRight, BoxDrawingsLightUpAndHorizontal}): BoxDrawingsLightVerticalAndHorizontal,
// (┌) + (┴) = (┼)
string([]rune{BoxDrawingsLightDownAndRight, BoxDrawingsLightVerticalAndHorizontal}): BoxDrawingsLightVerticalAndHorizontal,
// (┐) + (└) = (┼)
string([]rune{BoxDrawingsLightDownAndLeft, BoxDrawingsLightUpAndRight}): BoxDrawingsLightVerticalAndHorizontal,
// (┐) + (┘) = (┤)
string([]rune{BoxDrawingsLightDownAndLeft, BoxDrawingsLightUpAndLeft}): BoxDrawingsLightVerticalAndLeft,
// (┐) + (├) = (┼)
string([]rune{BoxDrawingsLightDownAndLeft, BoxDrawingsLightVerticalAndRight}): BoxDrawingsLightVerticalAndHorizontal,
// (┐) + (┤) = (┤)
string([]rune{BoxDrawingsLightDownAndLeft, BoxDrawingsLightVerticalAndLeft}): BoxDrawingsLightVerticalAndLeft,
// (┐) + (┬) = (┬)
string([]rune{BoxDrawingsLightDownAndLeft, BoxDrawingsLightDownAndHorizontal}): BoxDrawingsLightDownAndHorizontal,
// (┐) + (┴) = (┼)
string([]rune{BoxDrawingsLightDownAndLeft, BoxDrawingsLightUpAndHorizontal}): BoxDrawingsLightVerticalAndHorizontal,
// (┐) + (┼) = (┼)
string([]rune{BoxDrawingsLightDownAndLeft, BoxDrawingsLightVerticalAndHorizontal}): BoxDrawingsLightVerticalAndHorizontal,
// (└) + (┘) = (┴)
string([]rune{BoxDrawingsLightUpAndRight, BoxDrawingsLightUpAndLeft}): BoxDrawingsLightUpAndHorizontal,
// (└) + (├) = (├)
string([]rune{BoxDrawingsLightUpAndRight, BoxDrawingsLightVerticalAndRight}): BoxDrawingsLightVerticalAndRight,
// (└) + (┤) = (┼)
string([]rune{BoxDrawingsLightUpAndRight, BoxDrawingsLightVerticalAndLeft}): BoxDrawingsLightVerticalAndHorizontal,
// (└) + (┬) = (┼)
string([]rune{BoxDrawingsLightUpAndRight, BoxDrawingsLightDownAndHorizontal}): BoxDrawingsLightVerticalAndHorizontal,
// (└) + (┴) = (┴)
string([]rune{BoxDrawingsLightUpAndRight, BoxDrawingsLightUpAndHorizontal}): BoxDrawingsLightUpAndHorizontal,
// (└) + (┼) = (┼)
string([]rune{BoxDrawingsLightUpAndRight, BoxDrawingsLightVerticalAndHorizontal}): BoxDrawingsLightVerticalAndHorizontal,
// (┘) + (├) = (┼)
string([]rune{BoxDrawingsLightUpAndLeft, BoxDrawingsLightVerticalAndRight}): BoxDrawingsLightVerticalAndHorizontal,
// (┘) + (┤) = (┤)
string([]rune{BoxDrawingsLightUpAndLeft, BoxDrawingsLightVerticalAndLeft}): BoxDrawingsLightVerticalAndLeft,
// (┘) + (┬) = (┼)
string([]rune{BoxDrawingsLightUpAndLeft, BoxDrawingsLightDownAndHorizontal}): BoxDrawingsLightVerticalAndHorizontal,
// (┘) + (┴) = (┴)
string([]rune{BoxDrawingsLightUpAndLeft, BoxDrawingsLightUpAndHorizontal}): BoxDrawingsLightUpAndHorizontal,
// (┘) + (┼) = (┼)
string([]rune{BoxDrawingsLightUpAndLeft, BoxDrawingsLightVerticalAndHorizontal}): BoxDrawingsLightVerticalAndHorizontal,
// (├) + (┤) = (┼)
string([]rune{BoxDrawingsLightVerticalAndRight, BoxDrawingsLightVerticalAndLeft}): BoxDrawingsLightVerticalAndHorizontal,
// (├) + (┬) = (┼)
string([]rune{BoxDrawingsLightVerticalAndRight, BoxDrawingsLightDownAndHorizontal}): BoxDrawingsLightVerticalAndHorizontal,
// (├) + (┴) = (┼)
string([]rune{BoxDrawingsLightVerticalAndRight, BoxDrawingsLightUpAndHorizontal}): BoxDrawingsLightVerticalAndHorizontal,
// (├) + (┼) = (┼)
string([]rune{BoxDrawingsLightVerticalAndRight, BoxDrawingsLightVerticalAndHorizontal}): BoxDrawingsLightVerticalAndHorizontal,
// (┤) + (┬) = (┼)
string([]rune{BoxDrawingsLightVerticalAndLeft, BoxDrawingsLightDownAndHorizontal}): BoxDrawingsLightVerticalAndHorizontal,
// (┤) + (┴) = (┼)
string([]rune{BoxDrawingsLightVerticalAndLeft, BoxDrawingsLightUpAndHorizontal}): BoxDrawingsLightVerticalAndHorizontal,
// (┤) + (┼) = (┼)
string([]rune{BoxDrawingsLightVerticalAndLeft, BoxDrawingsLightVerticalAndHorizontal}): BoxDrawingsLightVerticalAndHorizontal,
// (┬) + (┴) = (┼)
string([]rune{BoxDrawingsLightDownAndHorizontal, BoxDrawingsLightUpAndHorizontal}): BoxDrawingsLightVerticalAndHorizontal,
// (┬) + (┼) = (┼)
string([]rune{BoxDrawingsLightDownAndHorizontal, BoxDrawingsLightVerticalAndHorizontal}): BoxDrawingsLightVerticalAndHorizontal,
// (┴) + (┼) = (┼)
string([]rune{BoxDrawingsLightUpAndHorizontal, BoxDrawingsLightVerticalAndHorizontal}): BoxDrawingsLightVerticalAndHorizontal,
}
// PrintJoinedSemigraphics prints a semigraphics rune into the screen at the given
// position with the given color, joining it with any existing semigraphics
// rune. Background colors are preserved. At this point, only regular single
// line borders are supported.
func PrintJoinedSemigraphics(screen tcell.Screen, x, y int, ch rune, color tcell.Color) {
previous, _, style, _ := screen.GetContent(x, y)
style = style.Foreground(color)
// What's the resulting rune?
var result rune
if ch == previous {
result = ch
} else {
if ch < previous {
previous, ch = ch, previous
}
result = SemigraphicJoints[string([]rune{previous, ch})]
}
if result == 0 {
result = ch
}
// We only print something if we have something.
screen.SetContent(x, y, result, nil, style)
}

View File

@ -278,7 +278,7 @@ func (t *Table) SetBordersColor(color tcell.Color) *Table {
// SetSeparator sets the character used to fill the space between two // SetSeparator sets the character used to fill the space between two
// neighboring cells. This is a space character ' ' per default but you may // neighboring cells. This is a space character ' ' per default but you may
// want to set it to GraphicsVertBar (or any other rune) if the column // want to set it to Borders.Vertical (or any other rune) if the column
// separation should be more visible. If cell borders are activated, this is // separation should be more visible. If cell borders are activated, this is
// ignored. // ignored.
// //
@ -668,24 +668,24 @@ ColumnLoop:
// Draw borders. // Draw borders.
rowY *= 2 rowY *= 2
for pos := 0; pos < columnWidth && columnX+1+pos < width; pos++ { for pos := 0; pos < columnWidth && columnX+1+pos < width; pos++ {
drawBorder(columnX+pos+1, rowY, GraphicsHoriBar) drawBorder(columnX+pos+1, rowY, Borders.Horizontal)
} }
ch := GraphicsCross ch := Borders.Cross
if columnIndex == 0 { if columnIndex == 0 {
if rowY == 0 { if rowY == 0 {
ch = GraphicsTopLeftCorner ch = Borders.TopLeft
} else { } else {
ch = GraphicsLeftT ch = Borders.LeftT
} }
} else if rowY == 0 { } else if rowY == 0 {
ch = GraphicsTopT ch = Borders.TopT
} }
drawBorder(columnX, rowY, ch) drawBorder(columnX, rowY, ch)
rowY++ rowY++
if rowY >= height { if rowY >= height {
break // No space for the text anymore. break // No space for the text anymore.
} }
drawBorder(columnX, rowY, GraphicsVertBar) drawBorder(columnX, rowY, Borders.Vertical)
} else if columnIndex > 0 { } else if columnIndex > 0 {
// Draw separator. // Draw separator.
drawBorder(columnX, rowY, t.separator) drawBorder(columnX, rowY, t.separator)
@ -706,18 +706,18 @@ ColumnLoop:
_, printed := printWithStyle(screen, cell.Text, x+columnX+1, y+rowY, finalWidth, cell.Align, tcell.StyleDefault.Foreground(cell.Color)|tcell.Style(cell.Attributes)) _, printed := printWithStyle(screen, cell.Text, x+columnX+1, y+rowY, finalWidth, cell.Align, tcell.StyleDefault.Foreground(cell.Color)|tcell.Style(cell.Attributes))
if StringWidth(cell.Text)-printed > 0 && printed > 0 { if StringWidth(cell.Text)-printed > 0 && printed > 0 {
_, _, style, _ := screen.GetContent(x+columnX+1+finalWidth-1, y+rowY) _, _, style, _ := screen.GetContent(x+columnX+1+finalWidth-1, y+rowY)
printWithStyle(screen, string(GraphicsEllipsis), x+columnX+1+finalWidth-1, y+rowY, 1, AlignLeft, style) printWithStyle(screen, string(SemigraphicsHorizontalEllipsis), x+columnX+1+finalWidth-1, y+rowY, 1, AlignLeft, style)
} }
} }
// Draw bottom border. // Draw bottom border.
if rowY := 2 * len(rows); t.borders && rowY < height { if rowY := 2 * len(rows); t.borders && rowY < height {
for pos := 0; pos < columnWidth && columnX+1+pos < width; pos++ { for pos := 0; pos < columnWidth && columnX+1+pos < width; pos++ {
drawBorder(columnX+pos+1, rowY, GraphicsHoriBar) drawBorder(columnX+pos+1, rowY, Borders.Horizontal)
} }
ch := GraphicsBottomT ch := Borders.BottomT
if columnIndex == 0 { if columnIndex == 0 {
ch = GraphicsBottomLeftCorner ch = Borders.BottomLeft
} }
drawBorder(columnX, rowY, ch) drawBorder(columnX, rowY, ch)
} }
@ -730,16 +730,16 @@ ColumnLoop:
for rowY := range rows { for rowY := range rows {
rowY *= 2 rowY *= 2
if rowY+1 < height { if rowY+1 < height {
drawBorder(columnX, rowY+1, GraphicsVertBar) drawBorder(columnX, rowY+1, Borders.Vertical)
} }
ch := GraphicsRightT ch := Borders.RightT
if rowY == 0 { if rowY == 0 {
ch = GraphicsTopRightCorner ch = Borders.TopRight
} }
drawBorder(columnX, rowY, ch) drawBorder(columnX, rowY, ch)
} }
if rowY := 2 * len(rows); rowY < height { if rowY := 2 * len(rows); rowY < height {
drawBorder(columnX, rowY, GraphicsBottomRightCorner) drawBorder(columnX, rowY, Borders.BottomRight)
} }
} }

View File

@ -5,6 +5,7 @@ import (
"fmt" "fmt"
"regexp" "regexp"
"sync" "sync"
"unicode"
"unicode/utf8" "unicode/utf8"
"github.com/gdamore/tcell" "github.com/gdamore/tcell"
@ -659,7 +660,7 @@ func (t *TextView) Draw(screen tcell.Screen) {
t.pageSize = height t.pageSize = height
// If the width has changed, we need to reindex. // If the width has changed, we need to reindex.
if width != t.lastWidth { if width != t.lastWidth && t.wrap {
t.index = nil t.index = nil
} }
t.lastWidth = width t.lastWidth = width
@ -815,7 +816,7 @@ func (t *TextView) Draw(screen tcell.Screen) {
// Draw the character. // Draw the character.
var comb []rune var comb []rune
if len(runeSequence) > 1 { if len(runeSequence) > 1 && !unicode.IsControl(runeSequence[1]) {
// Allocate space for the combining characters only when necessary. // Allocate space for the combining characters only when necessary.
comb = make([]rune, len(runeSequence)-1) comb = make([]rune, len(runeSequence)-1)
copy(comb, runeSequence[1:]) copy(comb, runeSequence[1:])

113
vendor/github.com/rivo/tview/util.go generated vendored
View File

@ -19,90 +19,6 @@ const (
AlignRight AlignRight
) )
// Semigraphical runes.
const (
GraphicsHoriBar = '\u2500'
GraphicsVertBar = '\u2502'
GraphicsTopLeftCorner = '\u250c'
GraphicsTopRightCorner = '\u2510'
GraphicsBottomLeftCorner = '\u2514'
GraphicsBottomRightCorner = '\u2518'
GraphicsLeftT = '\u251c'
GraphicsRightT = '\u2524'
GraphicsTopT = '\u252c'
GraphicsBottomT = '\u2534'
GraphicsCross = '\u253c'
GraphicsDbVertBar = '\u2550'
GraphicsDbHorBar = '\u2551'
GraphicsDbTopLeftCorner = '\u2554'
GraphicsDbTopRightCorner = '\u2557'
GraphicsDbBottomRightCorner = '\u255d'
GraphicsDbBottomLeftCorner = '\u255a'
GraphicsEllipsis = '\u2026'
)
// joints maps combinations of two graphical runes to the rune that results
// when joining the two in the same screen cell. The keys of this map are
// two-rune strings where the value of the first rune is lower than the value
// of the second rune. Identical runes are not contained.
var joints = map[string]rune{
"\u2500\u2502": GraphicsCross,
"\u2500\u250c": GraphicsTopT,
"\u2500\u2510": GraphicsTopT,
"\u2500\u2514": GraphicsBottomT,
"\u2500\u2518": GraphicsBottomT,
"\u2500\u251c": GraphicsCross,
"\u2500\u2524": GraphicsCross,
"\u2500\u252c": GraphicsTopT,
"\u2500\u2534": GraphicsBottomT,
"\u2500\u253c": GraphicsCross,
"\u2502\u250c": GraphicsLeftT,
"\u2502\u2510": GraphicsRightT,
"\u2502\u2514": GraphicsLeftT,
"\u2502\u2518": GraphicsRightT,
"\u2502\u251c": GraphicsLeftT,
"\u2502\u2524": GraphicsRightT,
"\u2502\u252c": GraphicsCross,
"\u2502\u2534": GraphicsCross,
"\u2502\u253c": GraphicsCross,
"\u250c\u2510": GraphicsTopT,
"\u250c\u2514": GraphicsLeftT,
"\u250c\u2518": GraphicsCross,
"\u250c\u251c": GraphicsLeftT,
"\u250c\u2524": GraphicsCross,
"\u250c\u252c": GraphicsTopT,
"\u250c\u2534": GraphicsCross,
"\u250c\u253c": GraphicsCross,
"\u2510\u2514": GraphicsCross,
"\u2510\u2518": GraphicsRightT,
"\u2510\u251c": GraphicsCross,
"\u2510\u2524": GraphicsRightT,
"\u2510\u252c": GraphicsTopT,
"\u2510\u2534": GraphicsCross,
"\u2510\u253c": GraphicsCross,
"\u2514\u2518": GraphicsBottomT,
"\u2514\u251c": GraphicsLeftT,
"\u2514\u2524": GraphicsCross,
"\u2514\u252c": GraphicsCross,
"\u2514\u2534": GraphicsBottomT,
"\u2514\u253c": GraphicsCross,
"\u2518\u251c": GraphicsCross,
"\u2518\u2524": GraphicsRightT,
"\u2518\u252c": GraphicsCross,
"\u2518\u2534": GraphicsBottomT,
"\u2518\u253c": GraphicsCross,
"\u251c\u2524": GraphicsCross,
"\u251c\u252c": GraphicsCross,
"\u251c\u2534": GraphicsCross,
"\u251c\u253c": GraphicsCross,
"\u2524\u252c": GraphicsCross,
"\u2524\u2534": GraphicsCross,
"\u2524\u253c": GraphicsCross,
"\u252c\u2534": GraphicsCross,
"\u252c\u253c": GraphicsCross,
"\u2534\u253c": GraphicsCross,
}
// Common regular expressions. // Common regular expressions.
var ( var (
colorPattern = regexp.MustCompile(`\[([a-zA-Z]+|#[0-9a-zA-Z]{6}|\-)?(:([a-zA-Z]+|#[0-9a-zA-Z]{6}|\-)?(:([lbdru]+|\-)?)?)?\]`) colorPattern = regexp.MustCompile(`\[([a-zA-Z]+|#[0-9a-zA-Z]{6}|\-)?(:([a-zA-Z]+|#[0-9a-zA-Z]{6}|\-)?(:([lbdru]+|\-)?)?)?\]`)
@ -419,7 +335,7 @@ func printWithStyle(screen tcell.Screen, text string, x, y, maxWidth, align int,
_, background, _ := finalStyle.Decompose() _, background, _ := finalStyle.Decompose()
finalStyle = overlayStyle(background, style, foregroundColor, backgroundColor, attributes) finalStyle = overlayStyle(background, style, foregroundColor, backgroundColor, attributes)
var comb []rune var comb []rune
if len(runeSequence) > 1 { if len(runeSequence) > 1 && !unicode.IsControl(runeSequence[1]) {
// Allocate space for the combining characters only when necessary. // Allocate space for the combining characters only when necessary.
comb = make([]rune, len(runeSequence)-1) comb = make([]rune, len(runeSequence)-1)
copy(comb, runeSequence[1:]) copy(comb, runeSequence[1:])
@ -475,7 +391,6 @@ func printWithStyle(screen tcell.Screen, text string, x, y, maxWidth, align int,
} }
runeSequence = append(runeSequence, ch) runeSequence = append(runeSequence, ch)
runeSeqWidth += chWidth runeSeqWidth += chWidth
} }
if drawnWidth+runeSeqWidth <= maxWidth { if drawnWidth+runeSeqWidth <= maxWidth {
flush() flush()
@ -608,32 +523,6 @@ func WordWrap(text string, width int) (lines []string) {
return return
} }
// PrintJoinedBorder prints a border graphics rune into the screen at the given
// position with the given color, joining it with any existing border graphics
// rune. Background colors are preserved. At this point, only regular single
// line borders are supported.
func PrintJoinedBorder(screen tcell.Screen, x, y int, ch rune, color tcell.Color) {
previous, _, style, _ := screen.GetContent(x, y)
style = style.Foreground(color)
// What's the resulting rune?
var result rune
if ch == previous {
result = ch
} else {
if ch < previous {
previous, ch = ch, previous
}
result = joints[string(previous)+string(ch)]
}
if result == 0 {
result = ch
}
// We only print something if we have something.
screen.SetContent(x, y, result, nil, style)
}
// Escape escapes the given text such that color and/or region tags are not // Escape escapes the given text such that color and/or region tags are not
// recognized and substituted by the print functions of this package. For // recognized and substituted by the print functions of this package. For
// example, to include a tag-like string in a box title or in a TextView: // example, to include a tag-like string in a box title or in a TextView:

View File

@ -680,6 +680,7 @@ func parseID(id interface{}) (string, error) {
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/README.html#data-validation-and-error-reporting // https://docs.gitlab.com/ce/api/README.html#data-validation-and-error-reporting
type ErrorResponse struct { type ErrorResponse struct {
Body []byte
Response *http.Response Response *http.Response
Message string Message string
} }
@ -700,12 +701,14 @@ func CheckResponse(r *http.Response) error {
errorResponse := &ErrorResponse{Response: r} errorResponse := &ErrorResponse{Response: r}
data, err := ioutil.ReadAll(r.Body) data, err := ioutil.ReadAll(r.Body)
if err == nil && data != nil { if err == nil && data != nil {
errorResponse.Body = data
var raw interface{} var raw interface{}
if err := json.Unmarshal(data, &raw); err != nil { if err := json.Unmarshal(data, &raw); err != nil {
errorResponse.Message = "failed to parse unknown error format" errorResponse.Message = "failed to parse unknown error format"
} else {
errorResponse.Message = parseError(raw)
} }
errorResponse.Message = parseError(raw)
} }
return errorResponse return errorResponse

Some files were not shown because too many files have changed in this diff Show More