gopkg.in/docker/libcompose.v0@v0.4.0/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 RemoveRunning 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 // Run holds options of compose run. 32 type Run struct { 33 Detached bool 34 } 35 36 // Up holds options of compose up. 37 type Up struct { 38 Create 39 } 40 41 // ImageType defines the type of image (local, all) 42 type ImageType string 43 44 // Valid indicates whether the image type is valid. 45 func (i ImageType) Valid() bool { 46 switch string(i) { 47 case "", "local", "all": 48 return true 49 default: 50 return false 51 } 52 }