{"modulePath":"github.com/codingconcepts/qapi","version":"v0.3.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package models\n\n## Functions\n\n```go\nfunc ValidateIsNotEmpty(key string, variables map[string]any) error\n```\n\n```go\nfunc ValidateIsNotNull(key string, variables map[string]any) error\n```\n\n```go\nfunc ValidateIsUUID(key string, variables map[string]any) error\n```\n\n## Types\n\n```go\ntype Assertion struct {\n\tType     string `json:\"type\"`\n\tVariable string `json:\"variable\"`\n}\n```\nAssertion allows assertions to be performed against variables.\n\n```go\ntype Config struct {\n\tEnvironment      Environment    `yaml:\"environment\"`\n\tVariables        map[string]any `yaml:\"variables\"`\n\tSetupRequests    []Request      `yaml:\"setup_requests\"`\n\tRequestFrequency time.Duration  `yaml:\"request_frequency\"`\n\tRequests         []Request      `yaml:\"requests\"`\n}\n```\nConfig holds the top-level configuration for the application.\n\n```go\ntype Environment struct {\n\tBaseURL string `yaml:\"base_url\"`\n}\n```\nEnvironment contains known, named values that configuration the application.\n\n```go\ntype Extractor struct {\n\tType      string            `yaml:\"type\"`\n\tSelectors map[string]string `yaml:\"selectors\"`\n}\n```\nExtractor allows values from responses to be captured and used in subsequent requests.\n\n```go\ntype Request struct {\n\tName       string            `yaml:\"name\"`\n\tHeaders    map[string]string `yaml:\"headers\"`\n\tMethod     string            `yaml:\"method\"`\n\tPath       string            `yaml:\"path\"`\n\tBody       string            `yaml:\"body\"`\n\tExtractors []Extractor       `yaml:\"extractors\"`\n\tAssertions []Assertion       `yaml:\"assertions\"`\n}\n```\nRequest holds the configuration that will be used when making a request to an API.\n\n```go\ntype RequestResult struct {\n\tStatusCode int\n}\n```\n\n```go\ntype RequestResults []RequestResult\n```\n\n```go\nfunc (rr RequestResults) Log(logger *zerolog.Logger)\n```\n\n```go\ntype Validator func(key string, variables map[string]any) error\n```\n\n","path":"github.com/codingconcepts/qapi/models","name":"models","synopsis":"","isRedistributable":true}
