Documentation ¶
Index ¶
- type Entry
- type HAR
- func (s *HAR) Add(req *http.Request, res *http.Response) error
- func (s *HAR) Delete(req *http.Request) bool
- func (s *HAR) Entries() []*Entry
- func (s *HAR) Init()
- func (s *HAR) Load() error
- func (s *HAR) Match(req *http.Request) *http.Response
- func (s *HAR) Save() error
- func (s *HAR) WithCurrentTimeOverride(fn func() time.Time)
- func (s *HAR) WithUUIDOverride(fn func() string)
- type OpenAPI
- type Storage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HAR ¶
type HAR struct {
// contains filtered or unexported fields
}
HAR is a Storage implementation that stores requests and responses in HAR format on disk.
func (*HAR) Add ¶
Add converts the http.Request and http.Response to a har.Entry and adds it to the Fixture.
func (*HAR) Entries ¶
Entries converts HAR entries to a slice of Entry (http.Request and http.Response pairs).
func (*HAR) WithCurrentTimeOverride ¶
WithCurrentTimeOverride replaces the default s.currentTime() with the given function.
func (*HAR) WithUUIDOverride ¶
WithUUIDOverride replaces the default s.newUUID() with the given function.
type OpenAPI ¶
type OpenAPI struct {
// contains filtered or unexported fields
}
OpenAPI is a storage implementation that stores requests and responses in OpenAPI format on disk.
func NewOpenAPIStorage ¶
NewOpenAPIStorage creates a new OpenAPI storage.
Click to show internal directories.
Click to hide internal directories.