Commits
- Commit:
d65c457cdb78bfe473db953cb4cd0f8243ec21be
- From:
- Oliver Lowe <o@olowe.co>
- Date:
Trim const type prefix
Not needed and easier to read when exposed in UI.
- Commit:
001c466e0421fdbaa864cc31ba288f60dc37068a
- From:
- Oliver Lowe <o@olowe.co>
- Date:
Store notes and notes_url object attributes
Used to document, explain stuff. Useful!
- Commit:
f21c51c745099616c3451e39569df1b46feae6af
- From:
- Oliver Lowe <o@olowe.co>
- Date:
Support icinga 2.12 acknowledgement, state, statetype field
On Debian 11 these fields are floats, not ints (or boolean) for some
reason. This patch allows unmarshalling either floats or integers
depending on what the icinga API sends us.
- Commit:
cb667a50cb18cc38d49e520642743de727bed3ca
- From:
- Oliver Lowe <o@olowe.co>
- Date:
Store last Host check result and time
Includes tests and simplified unmarshal test.
- Commit:
c26e0f9dab045063f9fb15a64233322532b18dcb
- From:
- Oliver Lowe <o@olowe.co>
- Date:
Use default MarshalJSON method
There's no point doing so much manual work and testing just to keep
fields under a "attrs" key when marshalling to JSON. When creating the
object we can just:
1. Marshal the object to JSON
2. Put it all under a "attrs" key.
Now it's easier to imagine the mapping of the structs to JSON, since
they follow the same rules as everything else in Go.
- Commit:
dca9442c1f7da187028aaaf66f2ebf7c34d6a863
- From:
- Oliver Lowe <o@olowe.co>
- Date:
Catch all HostStates and ServiceStates
This is closer to the Icinga spec, anything greater than 2 or 3 is unknown.
- Commit:
46ca0f68f521c66d60a5d6646a0a15350533c9b8
- From:
- Oliver Lowe <o@olowe.co>
- Date:
Marshal using struct tags rather than a custom map
I was excluding some struct fields so I thought I'd need to do some custom marshalling .
But you don't need to do this as you can use struct tags to optionally exclude things
from being put into JSON. Now there's no longer duplicate code between struct tags and keys in a map when marshalling. Handy!
- Commit:
562d5c1eb8a76a65d49d14b36edefb846f747494
- From:
- Oliver Lowe <o@olowe.co>
- Date:
Store acknowledgement status of hosts, services
- Commit:
dd0af5f789c1bac0444c33fcc4434922be48d1e7
- From:
- Oliver Lowe <o@olowe.co>
- Date:
Correctly marshal Hosts into JSON
We were missing some attributes, like not adding any groups or display
names. This also adds a test which checks whether we are marshalling
hosts into JSON correctly.
- Commit:
da19a2fd0fbbf44bc5495e68c7f24103d025b3b6
- From:
- Oliver Lowe <o@olowe.co>
- Date:
Store host state type
- Commit:
5105405ecc4e2ca95d7a7bab841b3de1520fc852
- From:
- Oliver Lowe <o@olowe.co>
- Date:
deduplicate new test client code
This adds a newTestClient option so that we aren't constantly creating
new http transports clients and all that
- Commit:
e0c24850440b8bcaa5bf6a49c0dd493fb30e94fb
- From:
- Oliver Lowe <o@olowe.co>
- Date:
Support Icinga2 hostgroups
Tests of hostgroup operations are done in TestFilter
- Commit:
b06b25c58a0ebeaf58a44f28f1422b842144e507
- From:
- Oliver Lowe <o@olowe.co>
- Date:
Remove unused attrs() method
It was required to satisfty the object interface but the interface
changed because it wasn't used anywhere.
- Commit:
26fb88e9ebc4192da36411de66032158b424369d
- From:
- Oliver Lowe <o@olowe.co>
- Date:
Generate CRUD code using go generate
Explanation for use is in the README
- Commit:
82fc97ff8eb537c28bce19af5ffb697773bd200c
- From:
- Oliver Lowe <o@olowe.co>
- Date:
Merge Hosts and FilterHosts
Getting all Hosts is the same as calling FilterHosts with an empty
filter anyway.
- Commit:
60c115fb1c7683cea9553380eddaeb0033dd17bf
- From:
- Oliver Lowe <o@olowe.co>
- Date:
Merge filter and all objects methods
Getting all objects is the same as getting objects with a zero filter.
- Commit:
76669f9b1f06b7299f2261667b4b21db38db7cae
- From:
- Oliver Lowe <o@olowe.co>
- Date:
I learned how to do some generic programming
New type "object" is an interface to represent an Icinga2 object.
I added heaps of other stuff! On our way to 1000 lines of code!
- Commit:
5055878019b72a9ed3408e337a21e868c3842cf5
- From:
- Oliver Lowe <o@olowe.co>
- Date:
more docs
- Commit:
6e415953de07ac11e0f54ac397d156b23f384a15
- From:
- Oliver Lowe <o@olowe.co>
- Date:
dump