github.com/etecs-ru/gnomock@v0.13.2/preset.go (about)

     1  package gnomock
     2  
     3  // Preset is a type that includes ready to use Gnomock configuration. Such
     4  // configuration includes image and ports as well as options specific to this
     5  // implementation. For example, well known services like Redis or Postgres may
     6  // have Gnomock implementations, providing healthcheck functions and basic
     7  // initialization options.
     8  type Preset interface {
     9  	// Image returns a canonical docker image used to setup this Preset.
    10  	Image() string
    11  
    12  	// Ports returns a group of ports exposed by this Preset, where every port
    13  	// is given a unique name. For example, if a container exposes API endpoint
    14  	// on port 8080, and web interface on port 80, there should be two named
    15  	// ports: "web" and "api".
    16  	Ports() NamedPorts
    17  
    18  	// Options returns a list of Option functions that allow to setup this
    19  	// Preset implementation.
    20  	Options() []Option
    21  }