summaryrefslogtreecommitdiff
path: root/vendor/github.com/mitchellh/hashstructure/include.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/mitchellh/hashstructure/include.go')
-rw-r--r--vendor/github.com/mitchellh/hashstructure/include.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/vendor/github.com/mitchellh/hashstructure/include.go b/vendor/github.com/mitchellh/hashstructure/include.go
new file mode 100644
index 00000000..b6289c0b
--- /dev/null
+++ b/vendor/github.com/mitchellh/hashstructure/include.go
@@ -0,0 +1,15 @@
+package hashstructure
+
+// Includable is an interface that can optionally be implemented by
+// a struct. It will be called for each field in the struct to check whether
+// it should be included in the hash.
+type Includable interface {
+ HashInclude(field string, v interface{}) (bool, error)
+}
+
+// IncludableMap is an interface that can optionally be implemented by
+// a struct. It will be called when a map-type field is found to ask the
+// struct if the map item should be included in the hash.
+type IncludableMap interface {
+ HashIncludeMap(field string, k, v interface{}) (bool, error)
+}