summaryrefslogtreecommitdiff
path: root/vendor/github.com/pborman/getopt/LICENSE
diff options
context:
space:
mode:
authorDan Duvall <dduvall@wikimedia.org>2018-03-06 20:31:58 -0800
committerDan Duvall <dduvall@wikimedia.org>2018-03-19 15:55:16 -0700
commiteb9b69dd3d710cb7afa1dfb6e23a5987842b21cc (patch)
tree049b11cc885e4e9f54aac8981c91a1bf3620e7af /vendor/github.com/pborman/getopt/LICENSE
parent6896e655eb5cc88b90e66979bc2d862eb92cbb9f (diff)
downloadblubber-eb9b69dd3d710cb7afa1dfb6e23a5987842b21cc.tar.gz
Allow for configuration policies
Summary: Implements a rough interface for validating configuration against arbitrary policy rules. Policies are provided as YAML and passed via the command line as file paths or remote URIs. The format of policies is: enforcements: - path: <path> rule: <rule> Where `<path>` is a YAML-ish path to a config field and `<rule>` is any expression our config validator understands (expressions built in by the validator library and custom tags defined in `config.validation.go`). Example policy: enforcements: - path: variants.production.base rule: oneof=debian:jessie debian:stretch - path: variants.production.runs.as rule: ne=foo - path: variants.production.node.dependencies rule: isfalse Command flag parsing was implemented in `main.go` to support the new `--policy=uri` flag and improve existing handling of `--version` and the usage statement. Test Plan: Run `go test ./...`. Reviewers: thcipriani, demon, hashar, mmodell, #release-engineering-team Reviewed By: thcipriani, #release-engineering-team Tags: #release-engineering-team Differential Revision: https://phabricator.wikimedia.org/D999
Diffstat (limited to 'vendor/github.com/pborman/getopt/LICENSE')
-rw-r--r--vendor/github.com/pborman/getopt/LICENSE27
1 files changed, 27 insertions, 0 deletions
diff --git a/vendor/github.com/pborman/getopt/LICENSE b/vendor/github.com/pborman/getopt/LICENSE
new file mode 100644
index 0000000..a8181ec
--- /dev/null
+++ b/vendor/github.com/pborman/getopt/LICENSE
@@ -0,0 +1,27 @@
+Copyright (c) 2017 Google Inc. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+ * Neither the name of Google, nor the names of other
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.