Documentation
¶
Overview ¶
Package httpserver — NTLM challenge/response helpers.
Package httpserver implements the HTTP mock server.
Index ¶
- func NTLMTokenType(authHeader string) int
- type Server
- func (s *Server) CallCount(mockID string) int64
- func (s *Server) GetMocks() []config.HTTPMock
- func (s *Server) MarshalMocks() ([]byte, error)
- func (s *Server) ResetCallCounts()
- func (s *Server) SetMocks(mocks []config.HTTPMock)
- func (s *Server) Start(ctx context.Context) error
- func (s *Server) StatusInfo() map[string]interface{}
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NTLMTokenType ¶ added in v0.11.0
NTLMTokenType classifies an NTLM Authorization header value. Returns 1 (Negotiate), 3 (Authenticate), or 0 (not NTLM / unrecognised).
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is the HTTP mock server.
func New ¶
func New(cfg *config.HTTPConfig, store *state.Store, sc *scenarios.Store, log *logger.Logger) *Server
New creates a Server. The mocks slice is taken from cfg initially but can be replaced at runtime via SetMocks.
func (*Server) CallCount ¶ added in v0.3.0
CallCount returns how many times the mock with the given ID has been called.
func (*Server) MarshalMocks ¶
MarshalMocks returns the mock list as JSON bytes.
func (*Server) ResetCallCounts ¶ added in v0.3.0
func (s *Server) ResetCallCounts()
ResetCallCounts zeroes all call counters.
func (*Server) StatusInfo ¶
StatusInfo returns JSON-serialisable info about this server.
Click to show internal directories.
Click to hide internal directories.