Documentation ¶
Index ¶
- type Adapter
- type CurlTestAdapter
- func (d CurlTestAdapter) GetSecretVariables(data string) (map[string]testkube.Variable, error)
- func (d CurlTestAdapter) GetType() string
- func (d CurlTestAdapter) Is(options apiClient.UpsertTestOptions) (name string, ok bool)
- func (d CurlTestAdapter) IsEnvName(filename string) (string, string, bool)
- func (d CurlTestAdapter) IsSecretEnvName(filename string) (string, string, bool)
- func (d CurlTestAdapter) IsTestName(filename string) (string, bool)
- type Detector
- func (d *Detector) Add(adapter Adapter)
- func (d *Detector) Detect(options client.UpsertTestOptions) (name string, found bool)
- func (d *Detector) DetectEnvName(filename string) (name, env, testType string, found bool)
- func (d *Detector) DetectSecretEnvName(filename string) (name, env, testType string, found bool)
- func (d *Detector) DetectTestName(filename string) (name, testType string, found bool)
- func (d *Detector) GetAdapter(testType string) Adapter
- type EnvFile
- type K6Adapter
- func (d K6Adapter) GetSecretVariables(data string) (map[string]testkube.Variable, error)
- func (d K6Adapter) GetType() string
- func (d K6Adapter) Is(options apiClient.UpsertTestOptions) (name string, ok bool)
- func (d K6Adapter) IsEnvName(filename string) (string, string, bool)
- func (d K6Adapter) IsSecretEnvName(filename string) (string, string, bool)
- func (d K6Adapter) IsTestName(filename string) (string, bool)
- type PostmanCollectionAdapter
- func (d PostmanCollectionAdapter) GetSecretVariables(data string) (map[string]testkube.Variable, error)
- func (d PostmanCollectionAdapter) GetType() string
- func (d PostmanCollectionAdapter) Is(options apiClient.UpsertTestOptions) (name string, ok bool)
- func (d PostmanCollectionAdapter) IsEnvName(filename string) (string, string, bool)
- func (d PostmanCollectionAdapter) IsSecretEnvName(filename string) (string, string, bool)
- func (d PostmanCollectionAdapter) IsTestName(filename string) (string, bool)
- type Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
type Adapter interface { // Is detects based on upsert test options what kind of test it is Is(options apiClient.UpsertTestOptions) (string, bool) // IsTestName detecs if filename has a conventional test name IsTestName(filename string) (string, bool) // IsEnvName detecs if filename has a conventional env name IsEnvName(filename string) (string, string, bool) // IsSecretEnvName detecs if filename has a conventional secret env name IsSecretEnvName(filename string) (string, string, bool) // GetSecretVariables retuns secret variables GetSecretVariables(data string) (map[string]testkube.Variable, error) // GetType returns test type GetType() string }
Adapter defines methods for test detection
type CurlTestAdapter ¶
type CurlTestAdapter struct { }
CurlTestAdapter is detector adapter for CURL like tests
func (CurlTestAdapter) GetSecretVariables ¶ added in v1.5.13
GetSecretVariables retuns secret variables
func (CurlTestAdapter) GetType ¶ added in v1.5.13
func (d CurlTestAdapter) GetType() string
GetType returns test type
func (CurlTestAdapter) Is ¶
func (d CurlTestAdapter) Is(options apiClient.UpsertTestOptions) (name string, ok bool)
Is detects based on upsert test options what kind of test it is
func (CurlTestAdapter) IsEnvName ¶ added in v1.5.13
func (d CurlTestAdapter) IsEnvName(filename string) (string, string, bool)
IsEnvName detecs if filename has a conventional env name
func (CurlTestAdapter) IsSecretEnvName ¶ added in v1.5.13
func (d CurlTestAdapter) IsSecretEnvName(filename string) (string, string, bool)
IsSecretEnvName detecs if filename has a conventional secret env name
func (CurlTestAdapter) IsTestName ¶ added in v1.5.13
func (d CurlTestAdapter) IsTestName(filename string) (string, bool)
IsTestName detecs if filename has a conventional test name
type Detector ¶
Detector is detection orchestrator for possible detectors
func NewDefaultDetector ¶
func NewDefaultDetector() Detector
func (*Detector) Detect ¶
func (d *Detector) Detect(options client.UpsertTestOptions) (name string, found bool)
Detect detects test type
func (*Detector) DetectEnvName ¶ added in v1.5.13
DetectEnvName detects env name
func (*Detector) DetectSecretEnvName ¶ added in v1.5.13
DetectSecretEnvName detecs secret env name
func (*Detector) DetectTestName ¶ added in v1.5.13
DetectTestName detects test name
func (*Detector) GetAdapter ¶ added in v1.5.13
GetAdapter return adapter by test type
type EnvFile ¶ added in v1.5.13
type EnvFile struct { ID string `json:"id"` Name string `json:"name"` Values []Value `json:"values"` PostmanVariableScope string `json:"_postman_variable_scope"` PostmanExportedAt time.Time `json:"_postman_exported_at"` PostmanExportedUsing string `json:"_postman_exported_using"` }
EnvFile contains env file structure
type K6Adapter ¶ added in v1.0.4
type K6Adapter struct{}
K6Adapter is detector adapter for Postman collection saved as JSON content
func (K6Adapter) GetSecretVariables ¶ added in v1.5.13
GetSecretVariables retuns secret variables
func (K6Adapter) Is ¶ added in v1.0.4
func (d K6Adapter) Is(options apiClient.UpsertTestOptions) (name string, ok bool)
Is detects based on upsert test options what kind of test it is
func (K6Adapter) IsEnvName ¶ added in v1.5.13
IsEnvName detecs if filename has a conventional env name
func (K6Adapter) IsSecretEnvName ¶ added in v1.5.13
IsSecretEnvName detecs if filename has a conventional secret env name
type PostmanCollectionAdapter ¶
type PostmanCollectionAdapter struct { }
PostmanCollectionAdapter is detector adapter for Postman collection saved as JSON content
func (PostmanCollectionAdapter) GetSecretVariables ¶ added in v1.5.13
func (d PostmanCollectionAdapter) GetSecretVariables(data string) (map[string]testkube.Variable, error)
GetSecretVariables retuns secret variables
func (PostmanCollectionAdapter) GetType ¶ added in v1.5.13
func (d PostmanCollectionAdapter) GetType() string
GetType returns test type
func (PostmanCollectionAdapter) Is ¶
func (d PostmanCollectionAdapter) Is(options apiClient.UpsertTestOptions) (name string, ok bool)
Is detects based on upsert test options what kind of test it is
func (PostmanCollectionAdapter) IsEnvName ¶ added in v1.5.13
func (d PostmanCollectionAdapter) IsEnvName(filename string) (string, string, bool)
IsEnvName detecs if filename has a conventional env name
func (PostmanCollectionAdapter) IsSecretEnvName ¶ added in v1.5.13
func (d PostmanCollectionAdapter) IsSecretEnvName(filename string) (string, string, bool)
IsSecretEnvName detecs if filename has a conventional secret env name
func (PostmanCollectionAdapter) IsTestName ¶ added in v1.5.13
func (d PostmanCollectionAdapter) IsTestName(filename string) (string, bool)
IsTestName detecs if filename has a conventional test name