mirror of
https://github.com/crazy-max/diun.git
synced 2025-01-12 11:38:11 +00:00
6318e4f069
I modeled it off the Kubernetes provider a bit. It supports setting task config at group and task levels using services and meta attributes.
21 lines
896 B
Go
21 lines
896 B
Go
package model
|
|
|
|
// Providers represents a provider configuration
|
|
type Providers struct {
|
|
Docker *PrdDocker `yaml:"docker,omitempty" json:"docker,omitempty" label:"allowEmpty" file:"allowEmpty"`
|
|
Swarm *PrdSwarm `yaml:"swarm,omitempty" json:"swarm,omitempty" label:"allowEmpty" file:"allowEmpty"`
|
|
Kubernetes *PrdKubernetes `yaml:"kubernetes,omitempty" json:"kubernetes,omitempty" label:"allowEmpty" file:"allowEmpty"`
|
|
File *PrdFile `yaml:"file,omitempty" json:"file,omitempty"`
|
|
Dockerfile *PrdDockerfile `yaml:"dockerfile,omitempty" json:"dockerfile,omitempty"`
|
|
Nomad *PrdNomad `yaml:"nomad,omitempty" json:"nomad,omitempty" label:"allowEmpty" file:"allowEmpty"`
|
|
}
|
|
|
|
// GetDefaults gets the default values
|
|
func (s *Providers) GetDefaults() *Providers {
|
|
return nil
|
|
}
|
|
|
|
// SetDefaults sets the default values
|
|
func (s *Providers) SetDefaults() {
|
|
// noop
|
|
}
|