github.com/smartcontractkit/chainlink-testing-framework/libs@v0.0.0-20240227141906-ec710b4eb1a3/config/chainlink_image.go (about)

     1  package config
     2  
     3  import (
     4  	"errors"
     5  )
     6  
     7  type ChainlinkImageConfig struct {
     8  	Image   *string `toml:"image"`
     9  	Version *string `toml:"version"`
    10  }
    11  
    12  // Validate checks that the chainlink image config is valid, which means that
    13  // both image and version are set and non-empty
    14  func (c *ChainlinkImageConfig) Validate() error {
    15  	if c.Image == nil || *c.Image == "" {
    16  		return errors.New("chainlink image name must be set")
    17  	}
    18  
    19  	if c.Version == nil || *c.Version == "" {
    20  		return errors.New("chainlink version must be set")
    21  	}
    22  
    23  	return nil
    24  }