github.com/demonoid81/moby@v0.0.0-20200517203328-62dd8e17c460/api/types/swarm/config.go (about) 1 package swarm // import "github.com/demonoid81/moby/api/types/swarm" 2 3 import "os" 4 5 // Config represents a config. 6 type Config struct { 7 ID string 8 Meta 9 Spec ConfigSpec 10 } 11 12 // ConfigSpec represents a config specification from a config in swarm 13 type ConfigSpec struct { 14 Annotations 15 Data []byte `json:",omitempty"` 16 17 // Templating controls whether and how to evaluate the config payload as 18 // a template. If it is not set, no templating is used. 19 Templating *Driver `json:",omitempty"` 20 } 21 22 // ConfigReferenceFileTarget is a file target in a config reference 23 type ConfigReferenceFileTarget struct { 24 Name string 25 UID string 26 GID string 27 Mode os.FileMode 28 } 29 30 // ConfigReferenceRuntimeTarget is a target for a config specifying that it 31 // isn't mounted into the container but instead has some other purpose. 32 type ConfigReferenceRuntimeTarget struct{} 33 34 // ConfigReference is a reference to a config in swarm 35 type ConfigReference struct { 36 File *ConfigReferenceFileTarget `json:",omitempty"` 37 Runtime *ConfigReferenceRuntimeTarget `json:",omitempty"` 38 ConfigID string 39 ConfigName string 40 }