model

package
v0.9.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 12, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AllBodyType = []BodyType{
	BodyTypePlain,
	BodyTypeJSON,
}

Functions

This section is empty.

Types

type App

type App struct {
	ID string `json:"id"`
}

type BodyResult

type BodyResult struct {
	Normal   bool         `json:"normal"`
	Type     BodyType     `json:"type"`
	Expected string       `json:"expected"`
	Actual   string       `json:"actual"`
	Errors   []*JSONError `json:"errors"`
}

type BodyType

type BodyType string
const (
	BodyTypePlain BodyType = "PLAIN"
	BodyTypeJSON  BodyType = "JSON"
)

func (BodyType) IsValid

func (e BodyType) IsValid() bool

func (BodyType) MarshalGQL

func (e BodyType) MarshalGQL(w io.Writer)

func (BodyType) String

func (e BodyType) String() string

func (*BodyType) UnmarshalGQL

func (e *BodyType) UnmarshalGQL(v interface{}) error

type DepMetaResult

type DepMetaResult struct {
	Normal   *bool   `json:"normal"`
	Key      *string `json:"key"`
	Expected *string `json:"expected"`
	Actual   *string `json:"actual"`
}

type DepResult

type DepResult struct {
	Name string           `json:"name"`
	Type DependencyType   `json:"type"`
	Meta []*DepMetaResult `json:"meta"`
}

type Dependency

type Dependency struct {
	Name string         `json:"name"`
	Type DependencyType `json:"type"`
	Meta []*Kv          `json:"meta"`
}

type DependencyInput

type DependencyInput struct {
	Name string         `json:"name"`
	Type DependencyType `json:"type"`
	Meta []*KVInput     `json:"meta"`
}

type DependencyType

type DependencyType string
const (
	DependencyTypeNoSQLDb    DependencyType = "NO_SQL_DB"
	DependencyTypeSQLDb      DependencyType = "SQL_DB"
	DependencyTypeHTTPClient DependencyType = "HTTP_CLIENT"
)

func (DependencyType) IsValid

func (e DependencyType) IsValid() bool

func (DependencyType) MarshalGQL

func (e DependencyType) MarshalGQL(w io.Writer)

func (DependencyType) String

func (e DependencyType) String() string

func (*DependencyType) UnmarshalGQL

func (e *DependencyType) UnmarshalGQL(v interface{}) error

type HTTPReq

type HTTPReq struct {
	ProtoMajor int       `json:"protoMajor"`
	ProtoMinor int       `json:"protoMinor"`
	URL        *string   `json:"url"`
	URLParam   []*Kv     `json:"urlParam"`
	Header     []*Header `json:"header"`
	Method     Method    `json:"method"`
	Body       string    `json:"body"`
}

type HTTPReqInput

type HTTPReqInput struct {
	ProtoMajor *int           `json:"protoMajor"`
	ProtoMinor *int           `json:"protoMinor"`
	URL        *string        `json:"url"`
	URLParam   []*KVInput     `json:"urlParam"`
	Header     []*HeaderInput `json:"header"`
	Method     *Method        `json:"method"`
	Body       *string        `json:"body"`
}

type HTTPResp

type HTTPResp struct {
	StatusCode int       `json:"statusCode"`
	Header     []*Header `json:"header"`
	Body       string    `json:"body"`
}

type HTTPRespInput

type HTTPRespInput struct {
	StatusCode *int           `json:"statusCode"`
	Header     []*HeaderInput `json:"header"`
	Body       *string        `json:"body"`
}
type Header struct {
	Key   string   `json:"key"`
	Value []string `json:"value"`
}

type HeaderInput

type HeaderInput struct {
	Key   string   `json:"key"`
	Value []string `json:"value"`
}

type HeaderResult

type HeaderResult struct {
	Normal   *bool   `json:"normal"`
	Key      string  `json:"key"`
	Expected *Header `json:"expected"`
	Actual   *Header `json:"actual"`
}

type IntResult

type IntResult struct {
	Normal   *bool `json:"normal"`
	Expected int   `json:"expected"`
	Actual   int   `json:"actual"`
}

type JSONError

type JSONError struct {
	Key               string `json:"key"`
	MissingInExpected bool   `json:"missingInExpected"`
	MissingInActual   bool   `json:"missingInActual"`
}

type KVInput

type KVInput struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type Kv

type Kv struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type Method

type Method string
const (
	MethodGet     Method = "GET"
	MethodPut     Method = "PUT"
	MethodHead    Method = "HEAD"
	MethodPost    Method = "POST"
	MethodPatch   Method = "PATCH"
	MethodDelete  Method = "DELETE"
	MethodOptions Method = "OPTIONS"
	MethodTrace   Method = "TRACE"
)

func (Method) IsValid

func (e Method) IsValid() bool

func (Method) MarshalGQL

func (e Method) MarshalGQL(w io.Writer)

func (Method) String

func (e Method) String() string

func (*Method) UnmarshalGQL

func (e *Method) UnmarshalGQL(v interface{}) error

type Result

type Result struct {
	StatusCode    *IntResult      `json:"statusCode"`
	HeadersResult []*HeaderResult `json:"headersResult"`
	BodyResult    *BodyResult     `json:"bodyResult"`
	DepResult     []*DepResult    `json:"depResult"`
}

type Test

type Test struct {
	ID         string        `json:"id"`
	Status     TestStatus    `json:"status"`
	Started    time.Time     `json:"started"`
	Completed  *time.Time    `json:"completed"`
	Result     *Result       `json:"result"`
	TestCaseID string        `json:"testCaseID"`
	URI        *string       `json:"uri"`
	Req        *HTTPReq      `json:"req"`
	Deps       []*Dependency `json:"deps"`
	Noise      []string      `json:"noise"`
}

type TestCase

type TestCase struct {
	ID       string        `json:"id"`
	Created  time.Time     `json:"created"`
	Updated  time.Time     `json:"updated"`
	Captured time.Time     `json:"captured"`
	Cid      string        `json:"cid"`
	App      string        `json:"app"`
	URI      string        `json:"uri"`
	HTTPReq  *HTTPReq      `json:"httpReq"`
	HTTPResp *HTTPResp     `json:"httpResp"`
	Deps     []*Dependency `json:"deps"`
	Anchors  []string      `json:"anchors"`
	Noise    []string      `json:"noise"`
}

type TestCaseInput

type TestCaseInput struct {
	ID       string             `json:"id"`
	Created  *time.Time         `json:"created"`
	Updated  *time.Time         `json:"updated"`
	Captured *time.Time         `json:"captured"`
	Cid      *string            `json:"cid"`
	App      *string            `json:"app"`
	URI      *string            `json:"uri"`
	HTTPReq  *HTTPReqInput      `json:"httpReq"`
	HTTPResp *HTTPRespInput     `json:"httpResp"`
	Deps     []*DependencyInput `json:"deps"`
	Anchors  []string           `json:"anchors"`
	Noise    []string           `json:"noise"`
}

type TestRun

type TestRun struct {
	ID      string        `json:"id"`
	Created time.Time     `json:"created"`
	Updated time.Time     `json:"updated"`
	Status  TestRunStatus `json:"status"`
	App     string        `json:"app"`
	User    string        `json:"user"`
	Success int           `json:"success"`
	Failure int           `json:"failure"`
	Total   int           `json:"total"`
	Tests   []*Test       `json:"tests"`
}

type TestRunStatus

type TestRunStatus string
const (
	TestRunStatusRunning TestRunStatus = "RUNNING"
	TestRunStatusFailed  TestRunStatus = "FAILED"
	TestRunStatusPassed  TestRunStatus = "PASSED"
)

func (TestRunStatus) IsValid

func (e TestRunStatus) IsValid() bool

func (TestRunStatus) MarshalGQL

func (e TestRunStatus) MarshalGQL(w io.Writer)

func (TestRunStatus) String

func (e TestRunStatus) String() string

func (*TestRunStatus) UnmarshalGQL

func (e *TestRunStatus) UnmarshalGQL(v interface{}) error

type TestStatus

type TestStatus string
const (
	TestStatusPending TestStatus = "PENDING"
	TestStatusRunning TestStatus = "RUNNING"
	TestStatusFailed  TestStatus = "FAILED"
	TestStatusPassed  TestStatus = "PASSED"
)

func (TestStatus) IsValid

func (e TestStatus) IsValid() bool

func (TestStatus) MarshalGQL

func (e TestStatus) MarshalGQL(w io.Writer)

func (TestStatus) String

func (e TestStatus) String() string

func (*TestStatus) UnmarshalGQL

func (e *TestStatus) UnmarshalGQL(v interface{}) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL