Documentation ¶
Index ¶
- Variables
- func CreateUser(db *mongo.Database, col string, username, password string) (insertedID primitive.ObjectID, err error)
- func DeleteContactsByID(_id primitive.ObjectID, db *mongo.Database, col string) error
- func DeleteKontakByID(_id primitive.ObjectID, db *mongo.Database, col string) error
- func DeletePresensiByID(_id primitive.ObjectID, db *mongo.Database, col string) error
- func GenerateRandomString(length int) (string, error)
- func GetAllContact(db *mongo.Database, col string) (data []model.Kontak)
- func GetAllContacts(db *mongo.Database, col string) (data []model.Contact)
- func GetAllPresensi(db *mongo.Database, col string) (data []model.Presensi)
- func GetAllPresensiFromStatus(checkin string, db *mongo.Database, col string) (data []model.Presensi)
- func GetContactsFromID(_id primitive.ObjectID, db *mongo.Database, col string) (kontak model.Contact, errs error)
- func GetKaryawanFromName(jabatan string, db *mongo.Database, col string) (staf model.Presensi)
- func GetKaryawanFromPhoneNumber(phone_number string, db *mongo.Database, col string) (staf model.Presensi, errs error)
- func GetKontakFromID(_id primitive.ObjectID, db *mongo.Database, col string) (kontak model.Kontak, errs error)
- func GetPresensiFromID(_id primitive.ObjectID, db *mongo.Database, col string) (staf model.Presensi, errs error)
- func GetPresensiFromStatus(checkin string, db *mongo.Database, col string) (data model.Presensi)
- func GetUserByUsername(username string, db *mongo.Database, col string) (user model.User, err error)
- func InsertContacts(db *mongo.Database, col, nmkontak, nmrkontak string) (insertedID primitive.ObjectID, err error)
- func InsertKaryawan(db *mongo.Database, nama string, phone_number string, jabatan string, ...) (InsertedID interface{})
- func InsertKontak(db *mongo.Database, col string, nmkontak string, nmrkontak string, almt string, ...) (insertedID primitive.ObjectID, err error)
- func InsertOneDoc(db *mongo.Database, collection string, doc interface{}) (insertedID interface{})
- func InsertPresensi(db *mongo.Database, col string, long float64, lat float64, lokasi string, ...) (insertedID primitive.ObjectID, err error)
- func Login(username, password string, db *mongo.Database, col string) (loggedIn bool, token string, err error)
- func UpdateContacts(db *mongo.Database, col string, id primitive.ObjectID, ...) (err error)
- func UpdateKontak(db *mongo.Database, col string, id primitive.ObjectID, nmkontak string, ...) (err error)
- func UpdatePresensi(db *mongo.Database, col string, id primitive.ObjectID, long float64, ...) (err error)
- func VerifyPassword(user model.User, providedPassword string) (bool, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var MongoConn = atdb.MongoConnect(MongoInfo)
View Source
var MongoInfo = atdb.DBInfo{ DBString: MongoString, DBName: "tes_db", }
View Source
var MongoString string = os.Getenv("MONGOSTRING")
Functions ¶
func CreateUser ¶ added in v0.0.22
func DeleteContactsByID ¶ added in v0.0.19
func DeleteKontakByID ¶ added in v0.0.15
func DeletePresensiByID ¶ added in v0.0.10
func GenerateRandomString ¶ added in v0.0.24
func GetAllContact ¶ added in v0.0.13
func GetAllContacts ¶ added in v0.0.19
func GetAllPresensi ¶ added in v0.0.4
func GetContactsFromID ¶ added in v0.0.19
func GetKaryawanFromName ¶
func GetKontakFromID ¶ added in v0.0.18
func GetPresensiFromID ¶ added in v0.0.8
func GetPresensiFromStatus ¶
func GetUserByUsername ¶ added in v0.0.22
func InsertContacts ¶ added in v0.0.19
func InsertKaryawan ¶
func InsertKontak ¶ added in v0.0.13
func InsertOneDoc ¶
func InsertPresensi ¶
func UpdateContacts ¶ added in v0.0.19
func UpdateKontak ¶ added in v0.0.15
func UpdatePresensi ¶ added in v0.0.6
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.