Commit Graph

35 Commits

Author SHA1 Message Date
Tim Hockin
493b3fab65 Unexport DNS regexps, lengths are still used 2016-07-03 02:20:11 -07:00
Tim Hockin
766f44f715 Move IsSecretKey into util/validation 2016-07-03 02:19:09 -07:00
Tim Hockin
37786e0e77 Make IsHTTPHeaderName return error strings 2016-07-02 17:34:32 -07:00
Tim Hockin
3ad6c397d7 Make IsValid{User,Group}Id return error strings 2016-07-02 17:34:32 -07:00
Tim Hockin
bb208a02b3 Make IsValidPercent return error strings 2016-07-02 17:34:32 -07:00
Tim Hockin
87c1fc50a8 Make IsValidIP return error strings
Also treat 0.0.0.0 as special, like loopback and multicast.
2016-07-02 17:32:05 -07:00
Tim Hockin
14bece550f Make IsValidPortNum/Name return error strings 2016-07-02 17:32:05 -07:00
Tim Hockin
189d4a5159 Make CIdentifier return error strings 2016-07-02 17:32:05 -07:00
David McMahon
ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
Tim Hockin
54a3efb364 Make IsDNS952Label return error strings 2016-05-19 08:57:49 -07:00
Tim Hockin
5862a60ae7 Make IsDNS1123Subdomain return error strings 2016-05-19 08:57:49 -07:00
Tim Hockin
77eff06a53 Make IsDNS1123Label return error strings 2016-05-19 08:57:49 -07:00
Tim Hockin
66d0d87829 Make IsValidLabelValue return error strings 2016-05-17 21:36:10 -07:00
Tim Hockin
72955770f3 Make IsQualifiedName return error strings 2016-05-10 11:23:23 -07:00
André Martins
c1a360b1d5 Removing IPv4 enforcement on Endpoints
Signed-off-by: André Martins <aanm90@gmail.com>
2016-04-14 16:20:00 +01:00
Tim Hockin
7cab7bd472 fix a few go-vet errors 2016-02-09 13:20:31 -08:00
Rudi Chiarito
a2d1bb7acf Add httpHeaders to httpGet liveness probe
Also update existing documentation and try to steer users away from 'host'.
Add validation.
2016-02-05 11:20:04 -05:00
mdshuai
27934da9cc Validate uids and gids for securitycontext 2016-01-11 15:17:25 +08:00
Tim Hockin
0fecf965b4 Change how one-of blocks are validated
I took a hard look at error output and played until I was happier.  This now
prints JSON for structs in the error, rather than go's format.

Also made the error message easier to read.

Fixed tests.
2015-12-18 09:42:14 -08:00
Tim Hockin
43ed74748e Clean up and document validation strings
Also add a detail string for Required and Forbidden.  Fix tests.
2015-12-18 09:40:50 -08:00
Tim Hockin
7fb8f60735 Shorten names for better reading 2015-12-10 11:48:19 -08:00
Tim Hockin
87a35047dd Move FieldPath and errors to a sub-package
This makes the naming and reading a lot simpler.
2015-12-10 11:48:16 -08:00
Tim Hockin
0fe29232eb Remove obsolete ErrorList Prefix logic 2015-12-03 08:19:52 -08:00
Tim Hockin
e6df0b1a24 Convert validation to use FieldPath
Before this change we have a mish-mash of ways to pass field names around for
error generation.  Sometimes string fieldnames, sometimes .Prefix(), sometimes
neither, often wrong names or not indexed when it should be.

Instead of that mess, this is part one of a couple of commits that will make it
more strongly typed and hopefully encourage correct behavior.  At least you
will have to think about field names, which is better than nothing.

It turned out to be really hard to do this incrementally.
2015-12-03 08:19:44 -08:00
Tim Hockin
102eced0b1 Introduce a FieldPath type for validation 2015-12-03 08:17:02 -08:00
Tim Hockin
ceee678b29 Rename validation 'New' funcs 2015-11-23 10:01:43 -08:00
Tim Hockin
682f2a5a79 Stronger typing for validation ErrorList 2015-11-23 10:01:43 -08:00
Tim Hockin
f8ad75df44 Clarify invalid vs not-supported 2015-11-23 08:07:17 -08:00
Tim Hockin
2c60a97e72 Clean up comments, reorder types 2015-11-23 08:07:17 -08:00
Tim Hockin
bca3780b7f Remove unused matcher 2015-11-22 20:13:24 -08:00
Tim Hockin
48b49a5cae s/ValidationErrorList/ErrorList/ 2015-11-22 20:13:20 -08:00
Tim Hockin
d64d1fbb3d s/ValidationError/Error/ 2015-11-22 20:12:46 -08:00
Tim Hockin
2a127d089a s/ValidationErrorType/ErrorType/ 2015-11-22 20:12:39 -08:00
Tim Hockin
0ff66da346 Move fielderrors into validation 2015-11-22 20:12:20 -08:00
tummychow
a21c52a766 Move util/validation files to their own package 2015-09-13 00:46:52 -07:00