Documentation
¶
Index ¶
- func CheckPasswordHash(password, hash string) bool
- func DeleteDoc(db *mongo.Database, collection string, filter bson.M) (result *mongo.DeleteResult)
- func DeleteOneDoc(db *mongo.Database, collection string, filter bson.M) (result *mongo.DeleteResult)
- func DocExists[T any](db *mongo.Database, collname string, filter bson.M, doc T) (result bool)
- func GetAllDistinctDoc(db *mongo.Database, filter bson.M, fieldname, collection string) (doc []any)
- func GetAllDoc[T any](db *mongo.Database, collection string) (doc []T, err error)
- func GetAllDocByFilter[T any](db *mongo.Database, collection string, filter bson.M) (doc []T, err error)
- func GetAllDocByFilterWithPagination[T any](db *mongo.Database, collection string, page, limit int, filter bson.M) (doc []T, datacount models.DataCount, err error)
- func GetAllDocWithPagination[T any](db *mongo.Database, collection string, page, limit int) (doc []T, datacount models.DataCount, err error)
- func GetDataForDashboard[T any](db *mongo.Database, collection, no_pend, kode_pelanggan string, ...) (docs []T, datacount models.DataCount, err error)
- func GetDocTesting[T any](db *mongo.Database, collection string, limit int, filter bson.M) (doc []T, err error)
- func GetOneDoc[T any](db *mongo.Database, collection string, filter bson.M) (doc T)
- func GetOneLatestDoc[T any](db *mongo.Database, collection string, filter bson.M) (doc T, err error)
- func GetRandomDoc[T any](db *mongo.Database, collection string, size uint) (result []T, err error)
- func HashPassword(password string) (string, error)
- func InsertOneDoc(db *mongo.Database, collection string, doc interface{}) (insertedID interface{}, err error)
- func MongoConnect(mconn models.DBInfo) *mongo.Database
- func ReplaceOneDoc(db *mongo.Database, collection string, filter bson.M, doc interface{}) (updatereseult *mongo.UpdateResult)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPasswordHash ¶
func DeleteOneDoc ¶
func GetAllDistinctDoc ¶
func GetAllDocByFilter ¶
func GetAllDocWithPagination ¶
func GetDataForDashboard ¶ added in v1.0.6
func GetDocTesting ¶ added in v1.1.1
func GetOneLatestDoc ¶
func GetRandomDoc ¶
func HashPassword ¶
func InsertOneDoc ¶
func ReplaceOneDoc ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.