Documentation ¶
Index ¶
- type StockController
- type WatchlistController
- func (wl *WatchlistController) Create(log *logrus.Entry, request *model.WatchlistRequest) (*model.Watchlist, error)
- func (wl *WatchlistController) Delete(log *logrus.Entry, id primitive.ObjectID, userID string) error
- func (wl *WatchlistController) Get(log *logrus.Entry, id primitive.ObjectID, userID string) (model.Watchlist, error)
- func (wl *WatchlistController) GetAll(log *logrus.Entry, userID string) ([]model.Watchlist, error)
- func (wl *WatchlistController) GetCalculated(log *logrus.Entry, id primitive.ObjectID, userID string) ([]model.CalculatedStockInfo, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StockController ¶ added in v1.1.0
type StockController struct {
// contains filtered or unexported fields
}
func NewStockController ¶ added in v1.1.0
func NewStockController(sc *api.StockClient, upC *api.UserprofileClient, ss *service.StockService) *StockController
func (*StockController) GetAllCalculated ¶ added in v1.1.0
func (sc *StockController) GetAllCalculated(log *logrus.Entry, userID string) ([]model.CalculatedStockInfo, error)
type WatchlistController ¶
type WatchlistController struct {
// contains filtered or unexported fields
}
func NewWatchlistController ¶
func NewWatchlistController(w *database.Watchlists, sc stockClient, upc userprofileClient, ss *service.StockService) *WatchlistController
func (*WatchlistController) Create ¶
func (wl *WatchlistController) Create(log *logrus.Entry, request *model.WatchlistRequest) (*model.Watchlist, error)
Create creates a new watchlist
func (*WatchlistController) Delete ¶
func (wl *WatchlistController) Delete(log *logrus.Entry, id primitive.ObjectID, userID string) error
Delete deletes the specified watchlist if that belongs to the authorized user
func (*WatchlistController) GetCalculated ¶
func (wl *WatchlistController) GetCalculated(log *logrus.Entry, id primitive.ObjectID, userID string) ([]model.CalculatedStockInfo, error)
Click to show internal directories.
Click to hide internal directories.