controllers

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2020 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

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) Get

func (*WatchlistController) GetAll

func (wl *WatchlistController) GetAll(log *logrus.Entry, userID string) ([]model.Watchlist, error)

func (*WatchlistController) GetCalculated

func (wl *WatchlistController) GetCalculated(log *logrus.Entry, id primitive.ObjectID, userID string) ([]model.CalculatedStockInfo, error)

Jump to

Keyboard shortcuts

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