diff --git a/models/template_models.go b/models/template_models.go new file mode 100644 index 0000000..03a2d7d --- /dev/null +++ b/models/template_models.go @@ -0,0 +1,40 @@ +package main + +type Parameter struct { + Name string `yaml:"name,omitempty"` + Value string `yaml:"value,omitempty"` +} + +type Container struct { + Image string `yaml:"image"` + Command []string `yaml:"command,omitempty,flow"` + Args []string `yaml:"args,omitempty,flow"` + VolumeMounts []VolumeMount `yaml:"volumeMounts,omitempty"` +} + +type VolumeMount struct { + Name string `yaml:"name"` + MountPath string `yaml:"mountPath"` +} + +type Task struct { + Name string `yaml:"name"` + Template string `yaml:"template"` + Dependencies []string `yaml:"dependencies,omitempty"` + Arguments struct { + Parameters []Parameter `yaml:"parameters,omitempty"` + } `yaml:"arguments,omitempty"` +} + +type Dag struct { + Tasks []Task `yaml:"tasks,omitempty"` +} + +type Template struct { + Name string `yaml:"name"` + Inputs struct { + Parameters []Parameter `yaml:"parameters"` + } `yaml:"inputs,omitempty"` + Container Container `yaml:"container,omitempty"` + Dag Dag `yaml:"dag,omitempty"` +} diff --git a/models/volume_models.go b/models/volume_models.go new file mode 100644 index 0000000..8396ada --- /dev/null +++ b/models/volume_models.go @@ -0,0 +1,19 @@ +package main + + + +type VolumeClaimTemplate struct { + Metadata struct { + Name string `yaml:"name"` + } `yaml:"metadata"` + Spec VolumeSpec `yaml:"spec"` +} + +type VolumeSpec struct { + AccessModes []string `yaml:"accessModes,flow"` + Resources struct { + Requests struct { + Storage string `yaml:"storage"` + } `yaml:"requests"` + } `yaml:"resources"` +} \ No newline at end of file