Commits
- 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:
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:
f8031e6577708de406336a0d73dcb1bb922238bc
- From:
- Oliver Lowe <o@olowe.co>
- Date:
Delete unused testUser var
This was used in some old tests but is now unused.
- 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:
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:
9ea5152367e4cfb31a1d08d23200575dc64058c4
- From:
- Oliver Lowe <o@olowe.co>
- Date:
Use slightly clearer param name
- Commit:
5055878019b72a9ed3408e337a21e868c3842cf5
- From:
- Oliver Lowe <o@olowe.co>
- Date:
more docs
- Commit:
6e415953de07ac11e0f54ac397d156b23f384a15
- From:
- Oliver Lowe <o@olowe.co>
- Date:
dump