module

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func DeleteKuesionerByID added in v0.0.8

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

func DeleteSurveyByID added in v0.0.13

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

func GetAllKuesioner

func GetAllKuesioner(db *mongo.Database, col string) (data []model.Kuesioner)

func GetAllKuesionerFromEmail added in v0.0.2

func GetAllKuesionerFromEmail(email string, db *mongo.Database, col string) (aksr []model.Kuesioner)

func GetAllSurvey added in v0.0.12

func GetAllSurvey(db *mongo.Database, col string) (data []model.Survey)

func GetKuesionerFromID added in v0.0.9

func GetKuesionerFromID(_id primitive.ObjectID, db *mongo.Database, col string) (ksr model.Kuesioner, errs error)

func GetKuesionerFromStatus

func GetKuesionerFromStatus(status string, db *mongo.Database, col string) (ksr model.Kuesioner)

func GetLokasiFromNama added in v0.0.2

func GetLokasiFromNama(nama string, db *mongo.Database, col string) (lks model.Lokasi)

func GetRespondenFromUsia added in v0.0.2

func GetRespondenFromUsia(usia int, db *mongo.Database, col string) (rsp model.Responden)

func GetSurveyFromID added in v0.0.13

func GetSurveyFromID(_id primitive.ObjectID, db *mongo.Database, col string) (ksr model.Survey, errs error)

func InsertAdmin added in v0.0.12

func InsertAdmin(db *mongo.Database, col string, username string, password string) (insertedID primitive.ObjectID, err error)

func InsertAnswer added in v0.0.2

func InsertAnswer(db *mongo.Database, col string, question_nomor int, text2 string) (InsertedID interface{})

func InsertKuesioner

func InsertKuesioner(db *mongo.Database, col string, lat float64, long float64, lokasi string, email string, status string, biodata model.Responden) (insertedID primitive.ObjectID, err error)

KUESIONER

func InsertLokasi added in v0.0.2

func InsertLokasi(db *mongo.Database, col string, nama string, kategori string) (InsertedID interface{})

func InsertOneDoc

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

func InsertQuestion added in v0.0.2

func InsertQuestion(db *mongo.Database, col string, nomor int, text string, options string) (InsertedID interface{})

func InsertResponden

func InsertResponden(db *mongo.Database, col string, nama string, jenis_kelamin string, usia int, email string, phone_number string) (InsertedID interface{})

func InsertSurvey added in v0.0.2

func InsertSurvey(db *mongo.Database, col string, kode int, title string, soal model.Question) (InsertedID interface{})

func InsertSurvey1 added in v0.0.13

func InsertSurvey1(db *mongo.Database, col string, kode int, title string, soal model.Question) (insertedID primitive.ObjectID, err error)

func LogAdmin added in v0.0.11

func LogAdmin(db *mongo.Database, col string, username string, password string) (authenticated bool, err error)

func UpdateKuesioner added in v0.0.8

func UpdateKuesioner(db *mongo.Database, col string, id primitive.ObjectID, lat float64, long float64, lokasi string, email string, status string, biodata model.Responden) (err error)

func UpdateSurvey added in v0.0.13

func UpdateSurvey(db *mongo.Database, id primitive.ObjectID, col string, kode int, title string, soal model.Question) (err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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