Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrHostNotMatch = errors.New("Host not match") ErrSchemeNotMatch = errors.New("Scheme not match") ErrFragmentNotMatch = errors.New("Fragment not match") ErrMethodNotMatch = errors.New("Method not match") ErrPathNotMatch = errors.New("Path not match") ErrQueryStringMatch = errors.New("Query string not match") ErrHeadersNotMatch = errors.New("Headers not match") ErrCookiesNotMatch = errors.New("Cookies not match") ErrBodyNotMatch = errors.New("Body not match") ErrScenarioNotMatch = errors.New("Scenario state not match") )
Functions ¶
This section is empty.
Types ¶
type Checker ¶
type Checker interface {
Check(req *definition.Request, mock *definition.Mock, scenarioAware bool) (bool, error)
}
Checker checks if the received request matches with some specific mock request definition.
type MemoryStore ¶
MemoryStore stores all received request and their matches in memory until the last reset
func NewMemoryStore ¶
func NewMemoryStore() *MemoryStore
NewMemoryStore is the MemoryStore contructor
func (*MemoryStore) GetAll ¶
func (mrs *MemoryStore) GetAll() []definition.Match
GetAll return current matches (positive and negative) in memory
func (*MemoryStore) Reset ¶
func (mrs *MemoryStore) Reset()
Reset clean the request stored in memory
func (*MemoryStore) Save ¶
func (mrs *MemoryStore) Save(req definition.Match)
Save store a match information
type Spier ¶
type Spier interface { Find(definition.Request) []definition.Match GetMatched() []definition.Match GetUnMatched() []definition.Match Store }
type Spy ¶
type Spy struct {
// contains filtered or unexported fields
}
func (Spy) Find ¶
func (mc Spy) Find(r definition.Request) []definition.Match
func (Spy) GetAll ¶
func (mc Spy) GetAll() []definition.Match
func (Spy) GetMatched ¶
func (mc Spy) GetMatched() []definition.Match
func (Spy) GetUnMatched ¶
func (mc Spy) GetUnMatched() []definition.Match
func (Spy) Save ¶
func (mc Spy) Save(match definition.Match)
type Store ¶
type Store interface { Save(definition.Match) Reset() GetAll() []definition.Match }
Click to show internal directories.
Click to hide internal directories.