github.com/hyperledger/burrow@v0.34.5-0.20220512172541-77f09336001d/deploy/def/playbook.go (about)

     1  package def
     2  
     3  import validation "github.com/go-ozzo/ozzo-validation"
     4  
     5  type Playbook struct {
     6  	Filename string
     7  	Account  string
     8  	// Prevent this playbook from running at the same time as other playbooks
     9  	NoParallel bool `mapstructure:"no-parallel,omitempty" json:"no-parallel,omitempty" yaml:"no-parallel,omitempty" toml:"no-parallel,omitempty"`
    10  	Jobs       []*Job
    11  	Path       string `mapstructure:"-" json:"-" yaml:"-" toml:"-"`
    12  	BinPath    string `mapstructure:"-" json:"-" yaml:"-" toml:"-"`
    13  	// If we're in a proposal or meta job, reference our parent script
    14  	Parent *Playbook `mapstructure:"-" json:"-" yaml:"-" toml:"-"`
    15  }
    16  
    17  func (pkg *Playbook) Validate() error {
    18  	return validation.ValidateStruct(pkg,
    19  		validation.Field(&pkg.Jobs),
    20  	)
    21  }