package
Version:
v0.2.5
Opens a new window with list of versions in this module.
Published: Apr 27, 2021
License: MIT
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type Mock struct {
Request Request `yaml:"request"`
Response Response `yaml:"response"`
}
Mock holds the data of one mock defined by the user.
Mock.Request is the structure of the request.
Mock.Response is the structure of the response.
type RIM struct {
Mocks []Mock `yaml:"mocks"`
}
RIM holds the data of all mocks defined by the user.
RIM.Mocks holds the data of all mocks defined by the user.
NewMocks creates the RIM structure based on the files in the directory.
type Request struct {
Method string `yaml:"method"`
Path string `yaml:"path"`
}
Request is the structure of the request.
Request.Method HTTP method of the request.
Request.Path is the endpoint of the request.
type Response struct {
Body interface{} `yaml:"body"`
Code uint16 `yaml:"code"`
}
Response is the structure of the response.
Response.Code the status code of the response.
Response.Body is the content that the server will send.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.