{"modulePath":"github.com/threefoldtech/zos_base","version":"v1.1.5","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package cloudinit\n\n## Constants\n\n```go\nconst (\n\tMountTypeAuto     = \"auto\"\n\tMountTypeVirtiofs = \"virtiofs\"\n)\n```\n\n## Functions\n\n```go\nfunc CreateImage(file string, cfg Configuration) error\n```\nCreateImage creates a fat32 image for cloud-init that has\n\n## Types\n\n```go\ntype Configuration struct {\n\tMetadata  Metadata\n\tNetwork   []Ethernet\n\tUsers     []User\n\tMounts    []Mount\n\tExtension Extension\n}\n```\n\n```go\ntype Ethernet struct {\n\tName        string       `yaml:\"-\"`\n\tMac         MacMatch     `yaml:\"match\"`\n\tDHCP4       bool         `yaml:\"dhcp4\"`\n\tAddresses   []string     `yaml:\"addresses\"`\n\tGateway4    string       `yaml:\"gateway4,omitempty\"`\n\tGateway6    string       `yaml:\"gateway6,omitempty\"`\n\tRoutes      []Route      `yaml:\"routes,omitempty\"`\n\tNameservers *Nameservers `yaml:\"nameservers,omitempty\"`\n}\n```\n\n```go\ntype Extension struct {\n\tEntrypoint  string\n\tEnvironment map[string]string\n}\n```\n\n```go\ntype MacMatch string\n```\n\n```go\nfunc (n MacMatch) MarshalYAML() (interface{}, error)\n```\n\n```go\nfunc (n MacMatch) String() string\n```\n\n```go\ntype Metadata struct {\n\tInstanceID string `yaml:\"instance-id\"`\n\tHostname   string `yaml:\"local-hostname\"`\n}\n```\n\n```go\ntype Mount struct {\n\tSource string\n\tTarget string\n\tType   MountType\n}\n```\n\n```go\nfunc (m Mount) MarshalYAML() (interface{}, error)\n```\n\n```go\ntype MountType string\n```\n\n```go\ntype Nameservers struct {\n\tSearch    []string `yaml:\"search,omitempty\"`\n\tAddresses []string `yaml:\"addresses\"` //required\n}\n```\n\n```go\ntype NetworkObjectType string\n```\n\n```go\ntype Route struct {\n\tTo     string `yaml:\"to\"`\n\tVia    string `yaml:\"via\"`\n\tMetric int    `yaml:\"metric,omitempty\"`\n}\n```\n\n```go\ntype SubnetType string\n```\n\n```go\ntype User struct {\n\tName string   `yaml:\"name\"`\n\tKeys []string `yaml:\"ssh_authorized_keys\"`\n}\n```\n\n","path":"github.com/threefoldtech/zos_base/pkg/vm/cloudinit","name":"cloudinit","synopsis":"","isRedistributable":true}
