Documentation ¶
Index ¶
- Constants
- type Action
- type BenchAction
- type CommonEnvironment
- type CommonSandbox
- type Config
- type ContainerEnvironment
- type ContainerImage
- type ContainerRegistry
- type ContainerRegistryAuth
- type ContainerSandbox
- type CustomExpectation
- type CustomExpectationAction
- type DockerEnvironment
- type DockerSandbox
- type Environment
- type EnvironmentPorts
- type EnvironmentType
- type ExpectationAction
- type Headers
- type Instance
- type InstanceTimeouts
- type KubernetesEnvironment
- type KubernetesSandbox
- type LocalEnvironment
- type LocalSandbox
- type MetricRule
- type MetricsExpectation
- type MetricsExpectationAction
- type NotAction
- type OutputExpectation
- type OutputExpectationAction
- type ParallelAction
- type Parameters
- type ReloadAction
- type RequestAction
- type Resources
- type ResponseBody
- type ResponseExpectation
- type ResponseExpectationAction
- type RestartAction
- type Sandbox
- type SandboxHook
- type SandboxHookArgsCommand
- type SandboxHookNative
- type SandboxHookShellCommand
- type SandboxHookSignal
- type SandboxHookType
- type SandboxType
- type Script
- type Server
- type ServerActions
- type ServerConfig
- type ServerExpectationAction
- type ServerMetricsExpectation
- type ServerOutputExpectation
- type ServerResponseExpectation
- type ServerTemplate
- type Service
- type ServiceConfig
- type ServiceResources
- type ServiceScripts
- type ServiceServer
- type Spec
- type SpecDefaults
- type SpecServiceDefaults
- type SpecServiceServerDefaults
- type SpecTimeouts
- type StartAction
- type StopAction
Constants ¶
View Source
const ( CommonEnvironmentType EnvironmentType = "common" LocalEnvironmentType = "local" ContainerEnvironmentType = "container" DockerEnvironmentType = "docker" KubernetesEnvironmentType = "kubernetes" )
View Source
const ( CommonSandboxType SandboxType = "common" LocalSandboxType = "local" ContainerSandboxType = "container" DockerSandboxType = "docker" KubernetesSandboxType = "kubernetes" )
View Source
const ( ReloadSandboxHookType SandboxHookType = "reload" RestartSandboxHookType = "restart" StartSandboxHookType = "start" StopSandboxHookType = "stop" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BenchAction ¶
type BenchAction struct { Service string `wst:"service"` Timeout int `wst:"timeout"` When string `wst:"when,enum=always|on_success|on_fail,default=on_success"` Id string `wst:"id,default=last"` Path string `wst:"path"` Method string `wst:"method,enum=GET|HEAD|DELETE|POST|PUT|PATCH|PURGE,default=GET"` Headers Headers `wst:"headers"` Frequency int `wst:"frequency"` Duration int `wst:"duration"` }
type CommonEnvironment ¶
type CommonEnvironment struct {
Ports EnvironmentPorts `wst:"ports"`
}
type CommonSandbox ¶
type CommonSandbox struct { Available bool `wst:"available,default=true"` Dirs map[string]string `wst:"dirs,keys=conf|run|script"` Hooks map[string]SandboxHook `wst:"hooks,factory=createHooks"` }
type ContainerEnvironment ¶
type ContainerEnvironment struct { Ports EnvironmentPorts `wst:"ports"` Registry ContainerRegistry `wst:"registry"` }
type ContainerImage ¶
type ContainerRegistry ¶
type ContainerRegistry struct {
Auth ContainerRegistryAuth `wst:"auth"`
}
type ContainerRegistryAuth ¶
type ContainerSandbox ¶
type ContainerSandbox struct { Available bool `wst:"available,default=true"` Dirs map[string]string `wst:"dirs,keys=conf|run|script"` Hooks map[string]SandboxHook `wst:"hooks,factory=createHooks"` Image ContainerImage `wst:"image,factory=createContainerImage"` Registry ContainerRegistry `wst:"registry"` }
type CustomExpectation ¶
type CustomExpectation struct { Name string `wst:"name"` Parameters Parameters `wst:"parameters,factory=createParameters"` }
type CustomExpectationAction ¶
type CustomExpectationAction struct { Service string `wst:"service"` Timeout int `wst:"timeout"` When string `wst:"when,enum=always|on_success|on_fail,default=on_success"` Custom CustomExpectation `wst:"custom"` }
type DockerEnvironment ¶
type DockerEnvironment struct { Ports EnvironmentPorts `wst:"ports"` Registry ContainerRegistry `wst:"registry"` NamePrefix string `wst:"name_prefix"` }
type DockerSandbox ¶
type DockerSandbox struct { Available bool `wst:"available,default=true"` Dirs map[string]string `wst:"dirs,keys=conf|run|script"` Hooks map[string]SandboxHook `wst:"hooks,factory=createHooks"` Image ContainerImage `wst:"image,factory=createContainerImage"` Registry ContainerRegistry `wst:"registry"` }
type Environment ¶
type Environment interface { }
type EnvironmentPorts ¶
type EnvironmentType ¶
type EnvironmentType string
type ExpectationAction ¶
type ExpectationAction interface { Action }
type Instance ¶
type Instance struct { Name string `wst:"name"` Title string `wst:"title"` Description string `wst:"description"` Labels []string `wst:"labels"` Resources Resources `wst:"resources"` Services map[string]Service `wst:"services,loadable"` Timeouts InstanceTimeouts `wst:"timeouts"` Environments map[string]Environment `wst:"environments,loadable,factory=createEnvironments"` Actions []Action `wst:"actions,factory=createActions"` }
type InstanceTimeouts ¶
type KubernetesEnvironment ¶
type KubernetesEnvironment struct { Ports EnvironmentPorts `wst:"ports"` Registry ContainerRegistry `wst:"registry"` Namespace string `wst:"namespace"` Kubeconfig string `wst:"kubeconfig,path=virtual"` }
type KubernetesSandbox ¶
type KubernetesSandbox struct { Available bool `wst:"available,default=true"` Dirs map[string]string `wst:"dirs,keys=conf|run|script"` Hooks map[string]SandboxHook `wst:"hooks,factory=createHooks"` Image ContainerImage `wst:"image,factory=createContainerImage"` Registry ContainerRegistry `wst:"registry"` }
type LocalEnvironment ¶
type LocalEnvironment struct {
Ports EnvironmentPorts `wst:"ports"`
}
type LocalSandbox ¶
type LocalSandbox struct { Available bool `wst:"available,default=true"` Dirs map[string]string `wst:"dirs,keys=conf|run|script"` Hooks map[string]SandboxHook `wst:"hooks,factory=createHooks"` }
type MetricRule ¶
type MetricsExpectation ¶
type MetricsExpectation struct { Id string `wst:"id,default=last"` Rules []MetricRule `wst:"rules"` }
type MetricsExpectationAction ¶
type MetricsExpectationAction struct { Service string `wst:"service"` Timeout int `wst:"timeout"` When string `wst:"when,enum=always|on_success|on_fail,default=on_success"` Metrics MetricsExpectation `wst:"metrics"` }
type OutputExpectation ¶
type OutputExpectation struct { Order string `wst:"order,enum=fixed|random,default=fixed"` Match string `wst:"match,enum=exact|regexp,default=exact"` Type string `wst:"type,enum=stdout|stderr|any,default=any"` RenderTemplate bool `wst:"render_template,default=true"` Messages []string `wst:"messages"` }
type OutputExpectationAction ¶
type OutputExpectationAction struct { Service string `wst:"service"` Timeout int `wst:"timeout"` When string `wst:"when,enum=always|on_success|on_fail,default=on_success"` Output OutputExpectation `wst:"output"` }
type ParallelAction ¶
type Parameters ¶
type Parameters map[string]interface{}
type ReloadAction ¶
type RequestAction ¶
type RequestAction struct { Service string `wst:"service"` Timeout int `wst:"timeout"` When string `wst:"when,enum=always|on_success|on_fail,default=on_success"` Id string `wst:"id,default=last"` Path string `wst:"path"` Method string `wst:"method,enum=GET|HEAD|DELETE|POST|PUT|PATCH|PURGE,default=GET"` Headers Headers `wst:"headers"` }
type ResponseBody ¶
type ResponseExpectation ¶
type ResponseExpectation struct { Request string `wst:"request,default=last"` Headers Headers `wst:"headers"` Body ResponseBody `wst:"body,string=Content"` }
type ResponseExpectationAction ¶
type ResponseExpectationAction struct { Service string `wst:"service"` Timeout int `wst:"timeout"` When string `wst:"when,enum=always|on_success|on_fail,default=on_success"` Response ResponseExpectation `wst:"response"` }
type RestartAction ¶
type SandboxHook ¶
type SandboxHook interface { }
type SandboxHookArgsCommand ¶
type SandboxHookNative ¶
type SandboxHookShellCommand ¶
type SandboxHookSignal ¶
type SandboxHookType ¶
type SandboxHookType string
type SandboxType ¶
type SandboxType string
type Script ¶
type Script struct { Content string `wst:"content"` Path string `wst:"path"` Mode string `wst:"mode,default=0644"` Parameters Parameters `wst:"parameters,factory=createParameters"` }
type Server ¶
type Server struct { Name string `wst:"name"` Tag string `wst:"tag"` Extends string `wst:"extends"` User string `wst:"user"` Group string `wst:"group"` Port int32 `wst:"port"` Configs map[string]ServerConfig `wst:"configs"` Templates map[string]ServerTemplate `wst:"templates"` Sandboxes map[string]Sandbox `wst:"sandboxes,factory=createSandboxes"` Parameters Parameters `wst:"parameters,factory=createParameters"` Actions ServerActions `wst:"actions"` }
type ServerActions ¶
type ServerActions struct {
Expect map[string]ServerExpectationAction `wst:"expect,factory=createServerExpectations"`
}
type ServerConfig ¶
type ServerConfig struct { File string `wst:"file,path"` Parameters Parameters `wst:"parameters,factory=createParameters"` }
type ServerExpectationAction ¶
type ServerExpectationAction interface { }
type ServerMetricsExpectation ¶
type ServerMetricsExpectation struct { Parameters Parameters `wst:"parameters,factory=createParameters"` Metrics MetricsExpectation `wst:"metrics"` }
type ServerOutputExpectation ¶
type ServerOutputExpectation struct { Parameters Parameters `wst:"parameters,factory=createParameters"` Output OutputExpectation `wst:"output"` }
type ServerResponseExpectation ¶
type ServerResponseExpectation struct { Parameters Parameters `wst:"parameters,factory=createParameters"` Response ResponseExpectation `wst:"response"` }
type ServerTemplate ¶
type ServerTemplate struct {
File string `wst:"file,path"`
}
type Service ¶
type Service struct { Server ServiceServer `wst:"server"` Resources ServiceResources `wst:"resources"` Requires []string `wst:"requires"` Public bool `wst:"public,default=false"` }
type ServiceConfig ¶
type ServiceConfig struct { Parameters Parameters `wst:"parameters,factory=createParameters"` Include bool `wst:"include,default=true"` }
type ServiceResources ¶
type ServiceResources struct {
Scripts ServiceScripts `wst:"scripts,factory=createServiceScripts"`
}
type ServiceScripts ¶
type ServiceServer ¶
type ServiceServer struct { Name string `wst:"name"` Tag string `wst:"tag"` Sandbox string `wst:"sandbox,enum=local|docker|kubernetes"` Configs map[string]ServiceConfig `wst:"configs"` Parameters Parameters `wst:"parameters,factory=createParameters"` }
type Spec ¶
type Spec struct { Environments map[string]Environment `wst:"environments,loadable,factory=createEnvironments"` Instances []Instance `wst:"instances,loadable"` Sandboxes map[string]Sandbox `wst:"sandboxes,loadable,factory=createSandboxes"` Servers []Server `wst:"servers,loadable"` Workspace string `wst:"workspace,path=virtual"` Defaults SpecDefaults `wst:"defaults,loadable"` }
type SpecDefaults ¶
type SpecDefaults struct { Service SpecServiceDefaults `wst:"service"` Timeouts SpecTimeouts `wst:"timeouts"` Parameters Parameters `wst:"parameters,factory=createParameters"` }
type SpecServiceDefaults ¶
type SpecServiceDefaults struct { Sandbox string `wst:"sandbox,enum=local|docker|kubernetes,default=local"` Server SpecServiceServerDefaults `wst:"server"` }
type SpecServiceServerDefaults ¶
type SpecServiceServerDefaults struct {
Tag string `wst:"tag,default=default"`
}
type SpecTimeouts ¶
type StartAction ¶
Click to show internal directories.
Click to hide internal directories.