github.com/skippbox/kompose-origin@v0.0.0-20160524133224-16a9dca7bac2/project/options/types.go (about) 1 package options 2 3 // Build holds options of compose build. 4 type Build struct { 5 NoCache bool 6 ForceRemove bool 7 Pull bool 8 } 9 10 // Delete holds options of compose rm. 11 type Delete struct { 12 RemoveVolume bool 13 BeforeDeleteCallback func([]string) bool 14 } 15 16 // Down holds options of compose down. 17 type Down struct { 18 RemoveVolume bool 19 RemoveImages ImageType 20 RemoveOrphans bool 21 } 22 23 // Create holds options of compose create. 24 type Create struct { 25 NoRecreate bool 26 ForceRecreate bool 27 NoBuild bool 28 // ForceBuild bool 29 } 30 31 // Up holds options of compose up. 32 type Up struct { 33 Create 34 } 35 36 // ImageType defines the type of image (local, all) 37 type ImageType string 38 39 // Valid indicates whether the image type is valid. 40 func (i ImageType) Valid() bool { 41 switch string(i) { 42 case "", "local", "all": 43 return true 44 default: 45 return false 46 } 47 }