From ff65cda025b11513c876c5747dcc549a07792f78 Mon Sep 17 00:00:00 2001 From: debugtalk Date: Tue, 7 Dec 2021 14:59:30 +0800 Subject: [PATCH] change: add docs --- models.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/models.go b/models.go index 8aac4eca..c1ee30cf 100644 --- a/models.go +++ b/models.go @@ -10,6 +10,8 @@ const ( httpPATCH string = "PATCH" ) +// TConfig represents config data structure for testcase. +// Each testcase should contain one config part. type TConfig struct { Name string `json:"name" yaml:"name"` // required Verify bool `json:"verify,omitempty" yaml:"verify,omitempty"` @@ -20,6 +22,8 @@ type TConfig struct { Weight int `json:"weight,omitempty" yaml:"weight,omitempty"` } +// Request represents HTTP request data structure. +// This is used for teststep. type Request struct { Method string `json:"method" yaml:"method"` // required URL string `json:"url" yaml:"url"` // required @@ -32,6 +36,7 @@ type Request struct { Verify bool `json:"verify,omitempty" yaml:"verify,omitempty"` } +// Validator represents validator for one HTTP response. type Validator struct { Check string `json:"check" yaml:"check"` // get value with jmespath Assert string `json:"assert" yaml:"assert"`