internal

package
v0.0.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 24, 2018 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HistoryGrabber

type HistoryGrabber struct {
	// contains filtered or unexported fields
}

func NewHistoryGrabber

func NewHistoryGrabber(db *database.SibylDatabase, symbolCache *SymbolCache) *HistoryGrabber

func (*HistoryGrabber) Run

func (hg *HistoryGrabber) Run() error

func (*HistoryGrabber) Stop

func (hg *HistoryGrabber) Stop(waitUpTo time.Duration)

type HttpRestServer

type HttpRestServer struct {
	// contains filtered or unexported fields
}

func NewHttpRestServer

func NewHttpRestServer(db *database.SibylDatabase, serverAddress string, stockValidator *StockValidator, serverDied context.CancelFunc) *HttpRestServer

func (*HttpRestServer) Run

func (hrs *HttpRestServer) Run() error

func (*HttpRestServer) Stop

func (hrs *HttpRestServer) Stop(waitUpTo time.Duration)

type HttpsRestServer

type HttpsRestServer struct {
	// contains filtered or unexported fields
}

func NewHttpsRestServer

func NewHttpsRestServer(db *database.SibylDatabase, serverAddress, publicCertPathname, privateKeyPathname string, stockValidator *StockValidator, serverDied context.CancelFunc) *HttpsRestServer

func (*HttpsRestServer) Run

func (hrs *HttpsRestServer) Run() error

func (*HttpsRestServer) Stop

func (hrs *HttpsRestServer) Stop(waitUpTo time.Duration)

type IntradayGrabber

type IntradayGrabber struct {
	// contains filtered or unexported fields
}

func NewIntradayGrabber

func NewIntradayGrabber(db *database.SibylDatabase, symbolCache *SymbolCache) *IntradayGrabber

func (*IntradayGrabber) Run

func (ig *IntradayGrabber) Run() error

func (*IntradayGrabber) Stop

func (ig *IntradayGrabber) Stop(waitUpTo time.Duration)

type OptionSymbolGrabber

type OptionSymbolGrabber struct {
	RequestUpdate chan bool
	// contains filtered or unexported fields
}

func NewOptionSymbolGrabber

func NewOptionSymbolGrabber(db *database.SibylDatabase, symbolCache *SymbolCache) *OptionSymbolGrabber

func (*OptionSymbolGrabber) Run

func (osg *OptionSymbolGrabber) Run() error

func (*OptionSymbolGrabber) Stop

func (osg *OptionSymbolGrabber) Stop(waitUpTo time.Duration)

type QuoteGrabber

type QuoteGrabber struct {
	// contains filtered or unexported fields
}

func NewQuoteGrabber

func NewQuoteGrabber(db *database.SibylDatabase, symbolCache *SymbolCache) *QuoteGrabber

func (*QuoteGrabber) Run

func (qg *QuoteGrabber) Run() error

func (*QuoteGrabber) Stop

func (qg *QuoteGrabber) Stop(waitUpTo time.Duration)

type ServerContext

type ServerContext struct {
	Ctx context.Context
	// contains filtered or unexported fields
}

func (*ServerContext) AgentAllyCreds

func (sc *ServerContext) AgentAllyCreds(writer http.ResponseWriter, request *http.Request)

func (*ServerContext) AgentCreds

func (sc *ServerContext) AgentCreds(writer http.ResponseWriter, request *http.Request)

func (*ServerContext) AgentUseAlly

func (sc *ServerContext) AgentUseAlly(writer http.ResponseWriter, request *http.Request)

func (*ServerContext) AgentUseTdAmeritrade

func (sc *ServerContext) AgentUseTdAmeritrade(writer http.ResponseWriter, request *http.Request)

func (*ServerContext) DatabaseDownloadHistory

func (sc *ServerContext) DatabaseDownloadHistory(writer http.ResponseWriter, request *http.Request)

func (*ServerContext) DatabaseDownloadIntraday

func (sc *ServerContext) DatabaseDownloadIntraday(writer http.ResponseWriter, request *http.Request)

func (*ServerContext) DatabaseDownloadOptionStable

func (sc *ServerContext) DatabaseDownloadOptionStable(writer http.ResponseWriter, request *http.Request)

func (*ServerContext) DatabaseDownloadOptionsQuote

func (sc *ServerContext) DatabaseDownloadOptionsQuote(writer http.ResponseWriter, request *http.Request)

func (*ServerContext) DatabaseDownloadStockQuote

func (sc *ServerContext) DatabaseDownloadStockQuote(writer http.ResponseWriter, request *http.Request)

func (*ServerContext) DatabaseDownloadStockStable

func (sc *ServerContext) DatabaseDownloadStockStable(writer http.ResponseWriter, request *http.Request)

func (*ServerContext) DatabaseUploadHistory

func (sc *ServerContext) DatabaseUploadHistory(writer http.ResponseWriter, request *http.Request)

func (*ServerContext) DatabaseUploadIntraday

func (sc *ServerContext) DatabaseUploadIntraday(writer http.ResponseWriter, request *http.Request)

func (*ServerContext) DatabaseUploadOptionStable

func (sc *ServerContext) DatabaseUploadOptionStable(writer http.ResponseWriter, request *http.Request)

func (*ServerContext) DatabaseUploadOptionsQuote

func (sc *ServerContext) DatabaseUploadOptionsQuote(writer http.ResponseWriter, request *http.Request)

func (*ServerContext) DatabaseUploadStockQuote

func (sc *ServerContext) DatabaseUploadStockQuote(writer http.ResponseWriter, request *http.Request)

func (*ServerContext) DatabaseUploadStockStable

func (sc *ServerContext) DatabaseUploadStockStable(writer http.ResponseWriter, request *http.Request)

func (*ServerContext) HistoryGet

func (sc *ServerContext) HistoryGet(writer http.ResponseWriter, request *http.Request)

func (*ServerContext) IntradayGet

func (sc *ServerContext) IntradayGet(writer http.ResponseWriter, request *http.Request)

func (*ServerContext) StockAdd

func (sc *ServerContext) StockAdd(writer http.ResponseWriter, request *http.Request)

func (*ServerContext) StockDelete

func (sc *ServerContext) StockDelete(writer http.ResponseWriter, request *http.Request)

func (*ServerContext) StockDisableAll

func (sc *ServerContext) StockDisableAll(writer http.ResponseWriter, request *http.Request)

func (*ServerContext) StockDisableDownloading

func (sc *ServerContext) StockDisableDownloading(writer http.ResponseWriter, request *http.Request)

func (*ServerContext) StockDisableHistory

func (sc *ServerContext) StockDisableHistory(writer http.ResponseWriter, request *http.Request)

func (*ServerContext) StockDisableIntraday

func (sc *ServerContext) StockDisableIntraday(writer http.ResponseWriter, request *http.Request)

func (*ServerContext) StockDisableQuotes

func (sc *ServerContext) StockDisableQuotes(writer http.ResponseWriter, request *http.Request)

func (*ServerContext) StockDisableStableQuotes

func (sc *ServerContext) StockDisableStableQuotes(writer http.ResponseWriter, request *http.Request)

func (*ServerContext) StockEnableAll

func (sc *ServerContext) StockEnableAll(writer http.ResponseWriter, request *http.Request)

func (*ServerContext) StockEnableDownloading

func (sc *ServerContext) StockEnableDownloading(writer http.ResponseWriter, request *http.Request)

func (*ServerContext) StockEnableHistory

func (sc *ServerContext) StockEnableHistory(writer http.ResponseWriter, request *http.Request)

func (*ServerContext) StockEnableIntraday

func (sc *ServerContext) StockEnableIntraday(writer http.ResponseWriter, request *http.Request)

func (*ServerContext) StockEnableQuotes

func (sc *ServerContext) StockEnableQuotes(writer http.ResponseWriter, request *http.Request)

func (*ServerContext) StockEnableStableQuotes

func (sc *ServerContext) StockEnableStableQuotes(writer http.ResponseWriter, request *http.Request)

func (*ServerContext) StockRevalidate

func (sc *ServerContext) StockRevalidate(writer http.ResponseWriter, request *http.Request)

func (*ServerContext) StocksGetAll

func (sc *ServerContext) StocksGetAll(writer http.ResponseWriter, request *http.Request)

type StableQuoteGrabber

type StableQuoteGrabber struct {
	// contains filtered or unexported fields
}

func NewStableQuoteGrabber

func NewStableQuoteGrabber(db *database.SibylDatabase, symbolCache *SymbolCache) *StableQuoteGrabber

func (*StableQuoteGrabber) Run

func (sqg *StableQuoteGrabber) Run() error

func (*StableQuoteGrabber) Stop

func (sqg *StableQuoteGrabber) Stop(waitUpTo time.Duration)

type StockValidator

type StockValidator struct {
	RequestUpdate chan bool
	// contains filtered or unexported fields
}

func NewStockValidator

func NewStockValidator(db *database.SibylDatabase, optionSymbolGrabber *OptionSymbolGrabber) *StockValidator

func (*StockValidator) Run

func (sv *StockValidator) Run() error

func (*StockValidator) Stop

func (sv *StockValidator) Stop(waitUpTo time.Duration)

type SymbolCache

type SymbolCache struct {
	HistorySymbols                  map[core.StockSymbolType]bool
	HistorySymbolsMu                sync.RWMutex
	HistorySymbolsChanged           chan bool
	IntradaySymbols                 map[core.StockSymbolType]bool
	IntradaySymbolsMu               sync.RWMutex
	IntradaySymbolsChanged          chan bool
	QuoteOptionsSymbols             map[core.OptionSymbolType]bool
	QuoteOptionsSymbolsMu           sync.RWMutex
	QuoteStockSymbols               map[core.StockSymbolType]bool
	QuoteStockSymbolsMu             sync.RWMutex
	StableQuoteOptionSymbols        map[core.OptionSymbolType]bool
	StableQuoteOptionSymbolsMu      sync.RWMutex
	StableQuoteOptionSymbolsChanged chan bool
	StableQuoteStockSymbols         map[core.StockSymbolType]bool
	StableQuoteStockSymbolsMu       sync.RWMutex
	StableQuoteStockSymbolsChanged  chan bool

	RequestUpdate chan bool
	// contains filtered or unexported fields
}

func NewSymbolsCache

func NewSymbolsCache(db *database.SibylDatabase) *SymbolCache

func (*SymbolCache) Run

func (sc *SymbolCache) Run() error

RunUpdater: creates and runs a go routine that will periodically (and if requested) update the symbols in the struct

func (*SymbolCache) Stop

func (sc *SymbolCache) Stop(waitUpTo time.Duration)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL