Documentation
¶
Index ¶
- Constants
- type CLICommandResult
- type CLICommandTest
- type CLIData
- type CLIStep
- type CLIStepCLICommand
- type CLIStepHTTPRequest
- type CLIStepResult
- type HTTPActions
- type HTTPBasicAuth
- type HTTPRequest
- type HTTPRequestResponseVariable
- type HTTPRequestResult
- type HTTPRequestTest
- type HTTPRequestTestHeader
- type HTTPRequestTestJSONValue
- type Lesson
- type LessonDataCLI
- type LoginRequest
- type LoginResponse
- type OperatorType
- type VerificationResultStructuredErrCLI
Constants ¶
View Source
const BaseURLOverrideRequired = "override"
View Source
const BaseURLPlaceholder = "${baseURL}"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CLICommandResult ¶ added in v1.3.0
type CLICommandTest ¶ added in v1.15.1
type CLIStep ¶ added in v1.18.0
type CLIStep struct { CLICommand *CLIStepCLICommand HTTPRequest *CLIStepHTTPRequest }
type CLIStepCLICommand ¶ added in v1.15.0
type CLIStepCLICommand struct { Command string Tests []CLICommandTest }
type CLIStepHTTPRequest ¶ added in v1.15.0
type CLIStepHTTPRequest struct { ResponseVariables []HTTPRequestResponseVariable Tests []HTTPRequestTest Request HTTPRequest }
type CLIStepResult ¶ added in v1.15.0
type CLIStepResult struct { CLICommandResult *CLICommandResult HTTPRequestResult *HTTPRequestResult }
type HTTPActions ¶ added in v1.18.0
type HTTPActions struct {
DelayRequestByMs *int
}
type HTTPBasicAuth ¶ added in v1.18.0
type HTTPRequest ¶ added in v1.18.0
type HTTPRequest struct { Method string FullURL string Headers map[string]string BodyJSON map[string]any BasicAuth *HTTPBasicAuth Actions HTTPActions }
type HTTPRequestResponseVariable ¶ added in v1.15.1
type HTTPRequestResult ¶ added in v1.15.0
type HTTPRequestTest ¶ added in v1.15.1
type HTTPRequestTest struct { StatusCode *int BodyContains *string BodyContainsNone *string HeadersContain *HTTPRequestTestHeader TrailersContain *HTTPRequestTestHeader JSONValue *HTTPRequestTestJSONValue }
Only one of these fields should be set
type HTTPRequestTestHeader ¶ added in v1.15.1
type HTTPRequestTestJSONValue ¶ added in v1.15.1
type HTTPRequestTestJSONValue struct { Path string Operator OperatorType IntValue *int StringValue *string BoolValue *bool }
type Lesson ¶ added in v1.4.0
type Lesson struct { Lesson struct { Type string LessonDataCLI *LessonDataCLI } }
func FetchLesson ¶ added in v1.4.0
type LessonDataCLI ¶ added in v1.15.0
type LessonDataCLI struct { // Readme string CLIData CLIData }
type LoginRequest ¶
type LoginRequest struct {
Otp string `json:"otp"`
}
type LoginResponse ¶
type LoginResponse struct { AccessToken string `json:"access_token"` RefreshToken string `json:"refresh_token"` }
func FetchAccessToken ¶
func FetchAccessToken() (*LoginResponse, error)
func LoginWithCode ¶
func LoginWithCode(code string) (*LoginResponse, error)
type OperatorType ¶
type OperatorType string
const ( OpEquals OperatorType = "eq" OpGreaterThan OperatorType = "gt" OpContains OperatorType = "contains" OpNotContains OperatorType = "not_contains" )
type VerificationResultStructuredErrCLI ¶ added in v1.20.0
type VerificationResultStructuredErrCLI struct { ErrorMessage string `json:"Error"` FailedStepIndex int `json:"FailedStepIndex"` FailedTestIndex int `json:"FailedTestIndex"` }
func SubmitCLILesson ¶ added in v1.15.0
func SubmitCLILesson(uuid string, results []CLIStepResult) (*VerificationResultStructuredErrCLI, error)
Click to show internal directories.
Click to hide internal directories.