module

package
v0.0.24 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2023 License: MIT Imports: 13 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

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 CreateUser(db *mongo.Database, col string, username, password string) (insertedID primitive.ObjectID, err error)

func DeleteContactsByID added in v0.0.19

func DeleteContactsByID(_id primitive.ObjectID, db *mongo.Database, col string) error

func DeleteKontakByID added in v0.0.15

func DeleteKontakByID(_id primitive.ObjectID, db *mongo.Database, col string) error

func DeletePresensiByID added in v0.0.10

func DeletePresensiByID(_id primitive.ObjectID, db *mongo.Database, col string) error

func GenerateRandomString added in v0.0.24

func GenerateRandomString(length int) (string, error)

func GetAllContact added in v0.0.13

func GetAllContact(db *mongo.Database, col string) (data []model.Kontak)

func GetAllContacts added in v0.0.19

func GetAllContacts(db *mongo.Database, col string) (data []model.Contact)

func GetAllPresensi added in v0.0.4

func GetAllPresensi(db *mongo.Database, col string) (data []model.Presensi)

func GetAllPresensiFromStatus

func GetAllPresensiFromStatus(checkin string, db *mongo.Database, col string) (data []model.Presensi)

func GetContactsFromID added in v0.0.19

func GetContactsFromID(_id primitive.ObjectID, db *mongo.Database, col string) (kontak model.Contact, errs error)

func GetKaryawanFromName

func GetKaryawanFromName(jabatan string, db *mongo.Database, col string) (staf model.Presensi)

func GetKaryawanFromPhoneNumber

func GetKaryawanFromPhoneNumber(phone_number string, db *mongo.Database, col string) (staf model.Presensi, errs error)

func GetKontakFromID added in v0.0.18

func GetKontakFromID(_id primitive.ObjectID, db *mongo.Database, col string) (kontak model.Kontak, errs error)

func GetPresensiFromID added in v0.0.8

func GetPresensiFromID(_id primitive.ObjectID, db *mongo.Database, col string) (staf model.Presensi, errs error)

func GetPresensiFromStatus

func GetPresensiFromStatus(checkin string, db *mongo.Database, col string) (data model.Presensi)

func GetUserByUsername added in v0.0.22

func GetUserByUsername(username string, db *mongo.Database, col string) (user model.User, err error)

func InsertContacts added in v0.0.19

func InsertContacts(db *mongo.Database, col, nmkontak, nmrkontak string) (insertedID primitive.ObjectID, err error)

func InsertKaryawan

func InsertKaryawan(db *mongo.Database, nama string, phone_number string, jabatan string, jam_kerja []model.JamKerja, hari_kerja []string) (InsertedID interface{})

func InsertKontak added in v0.0.13

func InsertKontak(db *mongo.Database, col string, nmkontak string, nmrkontak string, almt string, ktrngn string) (insertedID primitive.ObjectID, err error)

func InsertOneDoc

func InsertOneDoc(db *mongo.Database, collection string, doc interface{}) (insertedID interface{})

func InsertPresensi

func InsertPresensi(db *mongo.Database, col string, long float64, lat float64, lokasi string, phonenumber string, checkin string, biodata model.Karyawan) (insertedID primitive.ObjectID, err error)

func Login added in v0.0.22

func Login(username, password string, db *mongo.Database, col string) (loggedIn bool, token string, err error)

func UpdateContacts added in v0.0.19

func UpdateContacts(db *mongo.Database, col string, id primitive.ObjectID, nmkontak, nmrkontak string) (err error)

func UpdateKontak added in v0.0.15

func UpdateKontak(db *mongo.Database, col string, id primitive.ObjectID, nmkontak string, nmrkontak string, almt string, ktrngn string) (err error)

func UpdatePresensi added in v0.0.6

func UpdatePresensi(db *mongo.Database, col string, id primitive.ObjectID, long float64, lat float64, lokasi string, phonenumber string, checkin string, biodata model.Karyawan) (err error)

func VerifyPassword added in v0.0.22

func VerifyPassword(user model.User, providedPassword string) (bool, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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