[common-data] Add Validate and ValidateLength functions.

Add functions to validate the length of a base128-encoded string
and to validate the contents (no high bit set).

BUG=b:266749911
TEST=make test

Change-Id: I8205b5fa98d3400c8d9806960df23fb000737ca7
Reviewed-on: https://chromium-review.googlesource.com/c/infra/luci/luci-go/+/4201097
Commit-Queue: Gregory Nisbet <gregorynisbet@google.com>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
3 files changed
tree: 8a47f4dd56a79d6c6724b6d2d273b60e803b4b5a
  1. analysis/
  2. appengine/
  3. auth/
  4. auth_service/
  5. bisection/
  6. build/
  7. buildbucket/
  8. casviewer/
  9. cipd/
  10. client/
  11. cmdrunner/
  12. common/
  13. config/
  14. cv/
  15. deploy/
  16. examples/
  17. gae/
  18. gce/
  19. grpc/
  20. hardcoded/
  21. led/
  22. logdog/
  23. luci_notify/
  24. lucicfg/
  25. lucictx/
  26. luciexe/
  27. mailer/
  28. milo/
  29. mmutex/
  30. provenance/
  31. resultdb/
  32. scheduler/
  33. scripts/
  34. server/
  35. standalone/
  36. starlark/
  37. swarming/
  38. third_party/
  39. tokenserver/
  40. tools/
  41. vpython/
  42. web/
  43. .gitallowed
  44. .gitattributes
  45. .golangci.yml
  46. AUTHORS
  47. codereview.settings
  48. CONTRIBUTING.md
  49. CONTRIBUTORS
  50. go.mod
  51. go.sum
  52. LICENSE
  53. OWNERS
  54. PRESUBMIT.py
  55. README.md
  56. tools.go
  57. WATCHLISTS
README.md

luci-go: LUCI services and tools in Go

GoReference

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

It is now possible to directly install tools with go install:

go install go.chromium.org/luci/auth/client/cmd/...@latest
go install go.chromium.org/luci/buildbucket/cmd/...@latest
go install go.chromium.org/luci/cipd/client/cmd/...@latest
go install go.chromium.org/luci/client/cmd/...@latest
go install go.chromium.org/luci/cv/cmd/...@latest
go install go.chromium.org/luci/gce/cmd/...@latest
go install go.chromium.org/luci/grpc/cmd/...@latest
go install go.chromium.org/luci/logdog/client/cmd/...@latest
go install go.chromium.org/luci/luci_notify/cmd/...@latest
go install go.chromium.org/luci/lucicfg/cmd/...@latest
go install go.chromium.org/luci/luciexe/legacy/cmd/...@latest
go install go.chromium.org/luci/mailer/cmd/...@latest
go install go.chromium.org/luci/mmutex/cmd/...@latest
go install go.chromium.org/luci/resultdb/cmd/...@latest
go install go.chromium.org/luci/server/cmd/...@latest
go install go.chromium.org/luci/swarming/cmd/...@latest
go install go.chromium.org/luci/tokenserver/cmd/...@latest
go install go.chromium.org/luci/tools/cmd/...@latest

Contributing

Contributing uses the same flow as Chromium contributions.