aboutsummaryrefslogtreecommitdiffhomepage
path: root/vendor/github.com/fsouza/go-dockerclient/change.go
diff options
context:
space:
mode:
authorJake Champlin <jake@gnu.space>2017-06-09 17:54:32 +0000
committerJake Champlin <jake@gnu.space>2017-06-09 17:54:32 +0000
commit9b12e4fe6f3c95986f1f3ec791636c58ca7e7583 (patch)
tree38f5f12bec0e488a12f0459a7356e6b7de7d8f84 /vendor/github.com/fsouza/go-dockerclient/change.go
parentcec3de8a3bcaffd21dedd1bf42da4b490cae7e16 (diff)
downloadterraform-provider-statuscake-9b12e4fe6f3c95986f1f3ec791636c58ca7e7583.tar.gz
terraform-provider-statuscake-9b12e4fe6f3c95986f1f3ec791636c58ca7e7583.tar.zst
terraform-provider-statuscake-9b12e4fe6f3c95986f1f3ec791636c58ca7e7583.zip
Transfer of provider code
Diffstat (limited to 'vendor/github.com/fsouza/go-dockerclient/change.go')
-rw-r--r--vendor/github.com/fsouza/go-dockerclient/change.go43
1 files changed, 43 insertions, 0 deletions
diff --git a/vendor/github.com/fsouza/go-dockerclient/change.go b/vendor/github.com/fsouza/go-dockerclient/change.go
new file mode 100644
index 0000000..d133594
--- /dev/null
+++ b/vendor/github.com/fsouza/go-dockerclient/change.go
@@ -0,0 +1,43 @@
1// Copyright 2014 go-dockerclient authors. All rights reserved.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5package docker
6
7import "fmt"
8
9// ChangeType is a type for constants indicating the type of change
10// in a container
11type ChangeType int
12
13const (
14 // ChangeModify is the ChangeType for container modifications
15 ChangeModify ChangeType = iota
16
17 // ChangeAdd is the ChangeType for additions to a container
18 ChangeAdd
19
20 // ChangeDelete is the ChangeType for deletions from a container
21 ChangeDelete
22)
23
24// Change represents a change in a container.
25//
26// See https://goo.gl/9GsTIF for more details.
27type Change struct {
28 Path string
29 Kind ChangeType
30}
31
32func (change *Change) String() string {
33 var kind string
34 switch change.Kind {
35 case ChangeModify:
36 kind = "C"
37 case ChangeAdd:
38 kind = "A"
39 case ChangeDelete:
40 kind = "D"
41 }
42 return fmt.Sprintf("%s %s", kind, change.Path)
43}