Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockServer ¶
MockServer wraps an httptest.Server pre-configured to simulate Shopier API responses.
func NewMockServer ¶
func NewMockServer() *MockServer
NewMockServer initializes a new mock HTTP server.
func (*MockServer) Client ¶
func (m *MockServer) Client(opts ...shopier.Option) *shopier.Client
Client returns a Shopier Client pointed at this mock server.
func (*MockServer) Handle ¶
func (m *MockServer) Handle(pattern string, handler http.Handler)
Handle registers an HTTP handler for a specific path pattern.
func (*MockServer) HandleFunc ¶
func (m *MockServer) HandleFunc(pattern string, fn http.HandlerFunc)
HandleFunc registers a handler function for a specific path pattern.