Commit Graph

12 Commits

Author SHA1 Message Date
Gibheer 211877d18b fix sql driver interface for subnet type
Without this fix the interface was not recognized and resulted in an
error message.
2021-05-21 20:56:17 +02:00
Gibheer 08808fe984 add IPVersion type to properly parse a 4 or 6 2021-05-21 17:51:35 +02:00
Gibheer af625344a5 add more detials to parsing errors 2021-05-15 21:18:19 +02:00
Gibheer 5bb473404f add support for attributes in pools
Add support to show all pool attributes and set them.

Also add some helper functions to FieldMap to change and check the
requested attributes.
This was needed because the layer3domain needs to be set through
attributes instead of a link function (this should be changed, but for
now we will be compatible to ndcli).

So we filter out the layer3domain name and replace it with the ID, so
that the update can do both at the same time. Maybe there is a better
way to handle this in the future.
2021-05-09 21:22:52 +02:00
Gibheer 7c986e59ec add initial pool support
This is more or less a copy of the layer3domain support to support
pools.
2021-05-08 22:40:02 +02:00
Gibheer 01b87332d9 add a way to set attributes
For this to work, I have added a new function that takes a list of
key looking things and converts them into json.
At the same time, it also can convert json looking payloads and
prepare it for the database (that last part was not intended, but
works).

With the many columns where setting attributes is possible, this
functionality should help quite a bit.
2021-05-07 10:17:05 +02:00
Gibheer 1857bdd05a add layer3domain create and ipblock create
This is the first draft of creating layer3domains and
ipblocks/containers.

This allows some testing with different things, like list building for
complex container output, but also how containers should behave.
2021-05-03 22:40:27 +02:00
Gibheer b8f2414675 add a FieldList type
This type represents a list of fields someone might want to have
returned.
This can be used together with the query library to build select
statements that return the exact data the user might need or want.

This way we may be able to avoid selecting data one might not need at
the end and therefore provide better performance.
2021-04-28 21:08:24 +02:00
Gibheer 888655cc03 add String() method to zone
This way we can print it in nicer ways.
2021-04-28 21:06:38 +02:00
Gibheer 61d7ed2536 change zone type name to zonename
This should make it more obvious for what this type is intended.
2021-04-24 21:36:11 +02:00
Gibheer 9b3f2fddb1 add documentation for types package 2021-04-22 08:42:33 +02:00
Gibheer 7acd4803d0 add types package
This package will contain all the parameter types that need parsing from
the outside world into internal types.

Each type is required to implement its own UnmarshalJSON. At this point
it should also make the checks, if the incoming data is valid input, but
is not required to check against the database.
2021-04-22 08:35:24 +02:00