Documentation ¶
Index ¶
- Variables
- func IsSupportedDeviceType(deviceType string) bool
- func StandardizeVersionFormat(version string) string
- func Unmarshal(cfgPath string, project interface{}) error
- type ArtifactDownload
- type Artifacts
- type Defaults
- type Device
- type DeviceOptions
- type Docker
- type DockerFileMode
- type Emulator
- type Metadata
- type Npm
- type SauceConfig
- type Simulator
- type Tunnel
- type TypeDef
- type When
Examples ¶
Constants ¶
This section is empty.
Variables ¶
var ErrUnknownCfg = errors.New("unknown framework configuration")
ErrUnknownCfg is thrown when the provided config doesn't match anything known, be it in "kind" or the version of it.
var SupportedDeviceTypes = []string{"ANY", "PHONE", "TABLET"}
SupportedDeviceTypes contains the list of supported device types.
Functions ¶
func IsSupportedDeviceType ¶ added in v0.52.0
IsSupportedDeviceType check that the specified deviceType is valid.
func StandardizeVersionFormat ¶
StandardizeVersionFormat remove the leading v in version to ensure reliable comparisons.
Types ¶
type ArtifactDownload ¶ added in v0.36.0
type ArtifactDownload struct { Match []string `yaml:"match,omitempty" json:"match"` When When `yaml:"when,omitempty" json:"when"` Directory string `yaml:"directory,omitempty" json:"directory"` }
ArtifactDownload represents the test artifacts configuration.
type Artifacts ¶ added in v0.36.0
type Artifacts struct {
Download ArtifactDownload `yaml:"download,omitempty" json:"download"`
}
Artifacts represents the test artifacts configuration.
type Defaults ¶ added in v0.37.0
type Defaults struct {
Mode string `yaml:"mode,omitempty" json:"mode"`
}
Defaults represents default suite settings.
type Device ¶ added in v0.36.0
type Device struct { ID string `yaml:"id,omitempty" json:"id"` Name string `yaml:"name,omitempty" json:"name"` PlatformName string `yaml:"platformName,omitempty" json:"platformName"` PlatformVersion string `yaml:"platformVersion,omitempty" json:"platformVersion"` Options DeviceOptions `yaml:"options,omitempty" json:"options,omitempty"` }
Device represents the RDC device configuration.
type DeviceOptions ¶ added in v0.43.0
type DeviceOptions struct { CarrierConnectivity bool `yaml:"carrierConnectivity,omitempty" json:"carrierConnectivity"` DeviceType string `yaml:"deviceType,omitempty" json:"deviceType,omitempty"` Private bool `yaml:"private,omitempty" json:"private,omitempty"` }
DeviceOptions represents the devices capabilities required from a real device.
type Docker ¶
type Docker struct { FileTransfer DockerFileMode `yaml:"fileTransfer,omitempty" json:"fileTransfer"` Image string `yaml:"image,omitempty" json:"image"` }
Docker represents docker settings.
type DockerFileMode ¶
type DockerFileMode string
DockerFileMode represent the file providing method
const ( DockerFileMount DockerFileMode = "mount" DockerFileCopy DockerFileMode = "copy" )
DockerFile* represent the different modes
type Emulator ¶ added in v0.43.0
type Emulator struct { Name string `yaml:"name,omitempty" json:"name,omitempty"` PlatformName string `yaml:"platformName,omitempty" json:"platformName"` Orientation string `yaml:"orientation,omitempty" json:"orientation,omitempty"` PlatformVersions []string `yaml:"platformVersions,omitempty" json:"platformVersions,omitempty"` }
Emulator represents the emulator configuration.
type Metadata ¶
type Metadata struct { Tags []string `yaml:"tags" json:"tags,omitempty"` Build string `yaml:"build" json:"build"` }
Metadata describes job metadata
func (*Metadata) ExpandEnv ¶
func (m *Metadata) ExpandEnv()
ExpandEnv expands environment variables inside metadata fields.
Example ¶
os.Setenv("tname", "Envy") os.Setenv("ttag", "xp1") os.Setenv("tbuild", "Bob") m := Metadata{ Tags: []string{"$ttag"}, Build: "Build $tbuild", } m.ExpandEnv() fmt.Println(m)
Output: {[xp1] Build Bob}
type Npm ¶
type Npm struct { Registry string `yaml:"registry,omitempty" json:"registry,omitempty"` Packages map[string]string `yaml:"packages,omitempty" json:"packages"` StrictSSL bool `yaml:"strictSSL,omitempty" json:"strictSSL"` }
Npm represents the npm settings
type SauceConfig ¶
type SauceConfig struct { Region string `yaml:"region,omitempty" json:"region"` Metadata Metadata `yaml:"metadata,omitempty" json:"metadata"` Tunnel Tunnel `yaml:"tunnel,omitempty" json:"tunnel,omitempty"` Concurrency int `yaml:"concurrency,omitempty" json:"concurrency,omitempty"` Sauceignore string `yaml:"sauceignore,omitempty" json:"sauceignore,omitempty"` Experiments map[string]string `yaml:"experiments,omitempty" json:"experiments,omitempty"` }
SauceConfig represents sauce labs related settings.
type Simulator ¶ added in v0.49.0
type Simulator Emulator
Simulator represents the simulator configuration.
type Tunnel ¶
type Tunnel struct { ID string `yaml:"id,omitempty" json:"id"` Parent string `yaml:"parent,omitempty" json:"parent,omitempty"` }
Tunnel represents a sauce labs tunnel.