module

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: MIT Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MongoInfo = atdb.DBInfo{
	DBString: MongoString,
	DBName:   "UTS2024",
}
View Source
var MongoString string = os.Getenv("MONGOSTRING")

Functions

func GetAllAnggotaPerpustakaan

func GetAllAnggotaPerpustakaan() (data []model.AnggotaPerpustakaan)

func GetAllJamBuka

func GetAllJamBuka() (data []model.JamBuka)

func GetAllPeminjaman

func GetAllPeminjaman(db *mongo.Database, col string) (data []model.AnggotaPerpustakaan, jam []model.JamBuka, peminjaman []model.PeminjamanBuku)

func GetAllPeminjamanBuku

func GetAllPeminjamanBuku() (data []model.PeminjamanBuku)

func GetAnggotaPerpustakaanByID

func GetAnggotaPerpustakaanByID(_id primitive.ObjectID, db *mongo.Database, col string) (anggota model.AnggotaPerpustakaan, errs error)

func InsertAnggotaPerpustakaan

func InsertAnggotaPerpustakaan(nama string, alamat string, noTelp string, membershipID string, jamBuka model.JamBuka, peminjaman []model.PeminjamanBuku) (insertedID interface{})

func InsertJamBuka

func InsertJamBuka(hari string, jamMulai string, jamSelesai string) (insertedID interface{})

func InsertOneDoc

func InsertOneDoc(db string, collection string, doc interface{}) (insertedID interface{})

func InsertPeminjamanBuku

func InsertPeminjamanBuku(anggotaID primitive.ObjectID, bukuID primitive.ObjectID, tanggalPinjam time.Time, tanggalKembali time.Time, status string) (insertedID interface{})

func MongoConnect

func MongoConnect(dbname string) (db *mongo.Database)

Types

This section is empty.

Jump to

Keyboard shortcuts

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