[lucicfg] Add validate.int(), validate.bool() and validate.str_dict().

validate.int will be used to validate e.g. swarming priority
validate.bool will be used to validate Toggle-typed buildbucket fields.
validate.str_dict will be used to validate e.g. dimensions and properties.

Adjust the interface of the validators slightly to allow None to be used as
a value for required=False fields. It is useful to propagate None as "hasn't
been specified" flag (or equivalently to represent Toggle.UNSET), instead of
replacing it with some default value right away.

R=tandrii@chromium.org, nodir@chromium.org
BUG=833946

Change-Id: Ifbdc9a740972803e7f6d4bb707b07bcd418fb74b
Reviewed-on: https://chromium-review.googlesource.com/c/1399142
Commit-Queue: Vadim Shtayura <vadimsh@chromium.org>
Reviewed-by: Nodir Turakulov <nodir@chromium.org>
5 files changed
tree: 6950d02de80e8b6aaf5b73152ba3ddf478bdcf95
  1. appengine/
  2. auth/
  3. buildbucket/
  4. cipd/
  5. client/
  6. common/
  7. config/
  8. cq/
  9. dm/
  10. examples/
  11. gce/
  12. grpc/
  13. hardcoded/
  14. infra/
  15. logdog/
  16. luci_notify/
  17. lucicfg/
  18. lucictx/
  19. machine-db/
  20. milo/
  21. mmutex/
  22. mp/
  23. scheduler/
  24. scripts/
  25. server/
  26. starlark/
  27. tokenserver/
  28. tools/
  29. tumble/
  30. vpython/
  31. web/
  32. .travis.yml
  33. AUTHORS
  34. codereview.settings
  35. CONTRIBUTING.md
  36. CONTRIBUTORS
  37. LICENSE
  38. OWNERS
  39. pre-commit-go.yml
  40. PRESUBMIT.py
  41. README.md
README.md

luci-go: LUCI services and tools in Go

GoDoc

Installing

LUCI Go code is meant to be worked on from an Chromium infra.git checkout, which enforces packages versions and Go toolchain version. First get fetch via depot_tools.git then run:

fetch infra
cd infra/go
eval `./env.py`
cd src/go.chromium.org/luci

Contributing

Contributing uses the same flow as Chromium contributions.