Documentation ¶
Index ¶
- func GetAllMocks(ctx context.Context, req *proto.GetMockReq) ([]*proto.Mock, error)
- func GetHttpHeader(m map[string]*proto.StrArr) map[string][]string
- func GetProtoMap(m map[string][]string) map[string]*proto.StrArr
- func NewContext(conf Config) context.Context
- func PostHttpMock(ctx context.Context, path string, mock *proto.Mock) bool
- func StartRecordingMocks(ctx context.Context, path, mode, name string, overWrite bool) bool
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAllMocks ¶
func NewContext ¶
func PostHttpMock ¶ added in v0.5.3
Types ¶
type Config ¶
type Config struct { Mode keploy.Mode // Keploy mode on which unit test will run. Possible values: MODE_TEST or MODE_RECORD. Default: MODE_TEST Name string // Unique names for testcases of a unit test. If it is empty then, a unique id is generated by keploy during RECORD. CTX context.Context // Context in which KeployContext will be stored. If it is nil, then KeployContext is stored in context.Background. Path string // Path in which Keploy "/mocks" will be generated. Default: current working directroy. OverWrite bool // OverWrite is used to compare new outputs of external calls with previously recorded outputs during record. Remove []string // removes given http fields from yaml. Format: "<req_OR_resp_OR_all>.<header_OR_body>.<FIELD_NAME>" Replace map[string]string // replaces values of given http fields. Format: key (can be "header.<KEY>", "domain", "method", "proto_major", "proto_minor") }
Click to show internal directories.
Click to hide internal directories.