Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Market = MarketStatePost
Market is the market sesion.
View Source
var Verbose = false
Verbose controls log printing.
View Source
var Version string
Version is the mock server version number.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler interface {
Handle(r *http.Request, rte *regexp.Regexp) (statusCode int, responseData interface{})
}
Handler takes care of requests based on resource types.
type MarketState ¶
type MarketState string
MarketState is a market session.
const ( // MarketStatePre genius. MarketStatePre MarketState = "pre" // MarketStateRegular genius. MarketStateRegular MarketState = "regular" // MarketStatePost genius. MarketStatePost MarketState = "post" )
type StubServer ¶
type StubServer struct { Spec *fixture.Spec Fixtures *fixture.Fixtures // contains filtered or unexported fields }
StubServer handles incoming HTTP requests and responds to them appropriately based off the set of routes that it's been configured with.
func (*StubServer) HandleConfigRequest ¶
func (s *StubServer) HandleConfigRequest(w http.ResponseWriter, r *http.Request)
HandleConfigRequest handles an HTTP port directed at the API config stub.
func (*StubServer) HandleRequest ¶
func (s *StubServer) HandleRequest(w http.ResponseWriter, req *http.Request)
HandleRequest handles an HTTP request directed at the API stub.
func (*StubServer) InitRouter ¶
func (s *StubServer) InitRouter() error
InitRouter maps server routes to handlers.
type YFinService ¶
YFinService is a service that manages yahoo finance requests.
Click to show internal directories.
Click to hide internal directories.