~ubuntu-branches/debian/stretch/golang-github-mitchellh-hashstructure/stretch

« back to all changes in this revision

Viewing changes to include.go

  • Committer: Package Import Robot
  • Author(s): Dmitry Smirnov
  • Date: 2016-03-18 08:03:42 UTC
  • Revision ID: package-import@ubuntu.com-20160318080342-bk0mt9pz7voeiq7y
Tags: upstream-0.0~git20160209.0.6b17d66
ImportĀ upstreamĀ versionĀ 0.0~git20160209.0.6b17d66

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package hashstructure
 
2
 
 
3
// Includable is an interface that can optionally be implemented by
 
4
// a struct. It will be called for each field in the struct to check whether
 
5
// it should be included in the hash.
 
6
type Includable interface {
 
7
        HashInclude(field string, v interface{}) (bool, error)
 
8
}
 
9
 
 
10
// IncludableMap is an interface that can optionally be implemented by
 
11
// a struct. It will be called when a map-type field is found to ask the
 
12
// struct if the map item should be included in the hash.
 
13
type IncludableMap interface {
 
14
        HashIncludeMap(field string, k, v interface{}) (bool, error)
 
15
}