regression

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2022 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrInvalidRequest

func ErrInvalidRequest(err error) render.Renderer

func New

func New(r chi.Router, logger *zap.Logger, svc regression2.Service, run run.Service)

Types

type ErrResponse

type ErrResponse struct {
	Err            error `json:"-"` // low-level runtime error
	HTTPStatusCode int   `json:"-"` // http response status code

	StatusText string `json:"status"`          // ddb-level status message
	AppCode    int64  `json:"code,omitempty"`  // application-specific error code
	ErrorText  string `json:"error,omitempty"` // application-level error message, for debugging
}

func (*ErrResponse) Render

func (e *ErrResponse) Render(w http.ResponseWriter, r *http.Request) error

type TestCaseReq

type TestCaseReq struct {
	Captured int64               `json:"captured" bson:"captured"`
	AppID    string              `json:"app_id" bson:"app_id"`
	URI      string              `json:"uri" bson:"uri"`
	HttpReq  models.HttpReq      `json:"http_req" bson:"http_req"`
	HttpResp models.HttpResp     `json:"http_resp" bson:"http_resp"`
	Deps     []models.Dependency `json:"deps" bson:"deps"`
}

func (*TestCaseReq) Bind

func (req *TestCaseReq) Bind(r *http.Request) error

type TestReq

type TestReq struct {
	ID    string          `json:"id" bson:"_id"`
	AppID string          `json:"app_id" bson:"app_id"`
	RunID string          `json:"run_id" bson:"run_id"`
	Resp  models.HttpResp `json:"resp" bson:"resp"`
}

func (*TestReq) Bind

func (req *TestReq) Bind(r *http.Request) error

Jump to

Keyboard shortcuts

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