Documentation ¶
Index ¶
- Constants
- type DataBase
- func (db *DataBase) Add(col string, data interface{}) (*mongo.InsertOneResult, error)
- func (db *DataBase) Delete(col string, id string) error
- func (db *DataBase) Get(col, id string) (*mongo.SingleResult, error)
- func (db *DataBase) GetBy(col string, data interface{}) (*mongo.SingleResult, error)
- func (db *DataBase) GetList(col string, data interface{}) (*mongo.Cursor, error)
- func (db *DataBase) Update(col string, id string, data interface{}) (*mongo.UpdateResult, error)
Constants ¶
View Source
const ( User string = "users" Url string = "urls" UrlIfo string = "url_infos" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataBase ¶
func ConnectionDatabase ¶
func ConnectionDatabase() *DataBase
func (*DataBase) Add ¶
func (db *DataBase) Add(col string, data interface{}) (*mongo.InsertOneResult, error)
func (*DataBase) GetBy ¶
func (db *DataBase) GetBy(col string, data interface{}) (*mongo.SingleResult, error)
Click to show internal directories.
Click to hide internal directories.