Documentation ¶
Index ¶
- Variables
- func DisConnect()
- type DBHandler
- func (r *DBHandler) GetStockByCode(code string) (*model.Stock, error)
- func (r *DBHandler) InsertRecord(code string, record model.DailyRecord) (bool, error)
- func (r *DBHandler) InsertStock(stock model.NewStock) (*model.Stock, error)
- func (r *DBHandler) UpdateRecord(code string, record model.NewRecord) error
Constants ¶
This section is empty.
Variables ¶
View Source
var COLLECTION = "STOCK"
View Source
var DATABASE = "DEBUG"
View Source
var DB, _ = NewDBHandler("mongodb+srv://username:password@cluster0.jm9ahx2.mongodb.net/test")
Functions ¶
func DisConnect ¶
func DisConnect()
Types ¶
type DBHandler ¶
type DBHandler struct {
// contains filtered or unexported fields
}
func NewDBHandler ¶
func (*DBHandler) GetStockByCode ¶
func (*DBHandler) InsertRecord ¶
func (*DBHandler) InsertStock ¶
Click to show internal directories.
Click to hide internal directories.