Documentation
¶
Index ¶
- func CheckPasswordHash(password, hash string) bool
- func DeleteObat(db *mongo.Database, col string, _id primitive.ObjectID) (status bool, err error)
- func DeletePenyakit(db *mongo.Database, col string, _id primitive.ObjectID) (status bool, err error)
- func DeleteRS(db *mongo.Database, col string, _id primitive.ObjectID) (status bool, err error)
- func GCFReturnStruct(DataStuct any) string
- func HandlerDeleteObat(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func HandlerDeletePenyakit(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func HandlerDeleteRS(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func HandlerGetAllObat(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func HandlerGetAllPenyakit(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func HandlerGetAllRS(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func HandlerGetAllUser(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func HandlerGetObatByID(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func HandlerGetPenyakitByID(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func HandlerGetRSByID(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func HandlerGetUserByID(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func HandlerInsertObat(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func HandlerInsertPenyakit(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func HandlerInsertRS(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func HandlerLogin(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func HandlerRegister(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func HandlerUpdateObat(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func HandlerUpdatePenyakit(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func HandlerUpdateRS(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func HashPassword(password string) (string, error)
- func InsertOneDoc(db *mongo.Database, col string, docs interface{}) (insertedID primitive.ObjectID, err error)
- func MongoConnect(MONGOCONNSTRINGENV, dbname string) *mongo.Database
- func Register(db *mongo.Database, col string, userdata User) error
- type Credential
- type Obat
- func GetAllObat(db *mongo.Database, col string) (obat []Obat, err error)
- func GetObatByID(db *mongo.Database, col string, _id primitive.ObjectID) (obat Obat, err error)
- func InsertObat(db *mongo.Database, col string, r *http.Request) (docs Obat, err error)
- func UpdateObat(db *mongo.Database, col string, _id primitive.ObjectID, r *http.Request) (docs Obat, err error)
- type Penyakit
- func GetAllPenyakit(db *mongo.Database, col string) (penyakit []Penyakit, err error)
- func GetPenyakitByID(db *mongo.Database, col string, _id primitive.ObjectID) (penyakit Penyakit, err error)
- func InsertPenyakit(db *mongo.Database, col string, r *http.Request) (docs Penyakit, err error)
- func UpdatePenyakit(db *mongo.Database, col string, _id primitive.ObjectID, r *http.Request) (docs Penyakit, err error)
- type Response
- type RumahSakit
- func GetAllRS(db *mongo.Database, col string) (rs []RumahSakit, err error)
- func GetRSByID(db *mongo.Database, col string, _id primitive.ObjectID) (rs RumahSakit, err error)
- func InsertRS(db *mongo.Database, col string, r *http.Request) (docs RumahSakit, err error)
- func UpdateRS(db *mongo.Database, col string, _id primitive.ObjectID, r *http.Request) (docs RumahSakit, err error)
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPasswordHash ¶
func DeleteObat ¶
func DeletePenyakit ¶
func GCFReturnStruct ¶
func HandlerDeleteObat ¶
func HandlerDeletePenyakit ¶
func HandlerDeleteRS ¶ added in v0.1.2
func HandlerGetAllObat ¶
obat
func HandlerGetAllPenyakit ¶
func HandlerGetAllPenyakit(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
penyakit
func HandlerGetAllRS ¶ added in v0.1.2
rumah sakit
func HandlerGetAllUser ¶ added in v0.1.5
func HandlerGetObatByID ¶
func HandlerGetPenyakitByID ¶
func HandlerGetRSByID ¶ added in v0.1.2
func HandlerGetUserByID ¶ added in v0.1.5
func HandlerInsertObat ¶
func HandlerInsertPenyakit ¶
func HandlerInsertRS ¶ added in v0.1.2
func HandlerLogin ¶
func HandlerRegister ¶ added in v0.1.5
user
func HandlerUpdateObat ¶
func HandlerUpdatePenyakit ¶
func HandlerUpdateRS ¶ added in v0.1.2
func HashPassword ¶
func InsertOneDoc ¶ added in v0.0.4
func MongoConnect ¶
Types ¶
type Credential ¶ added in v0.1.1
type Obat ¶
type Obat struct {
ID primitive.ObjectID `bson:"_id,omitempty" json:"_id,omitempty"`
Jenis_Obat string `bson:"jenis_obat,omitempty" json:"jenis_obat,omitempty"`
Nama_Obat string `bson:"nama_obat,omitempty" json:"nama_obat,omitempty"`
Deskripsi string `bson:"deskripsi,omitempty" json:"deskripsi,omitempty"`
Gambar string `bson:"gambar,omitempty" json:"gambar,omitempty"`
}
tambah gambar
func GetObatByID ¶
func InsertObat ¶
type Penyakit ¶
type Penyakit struct {
ID primitive.ObjectID `bson:"_id,omitempty" json:"_id,omitempty"`
Jenis_Penyakit string `bson:"jenis_penyakit,omitempty" json:"jenis_penyakit,omitempty"`
Nama_Penyakit string `bson:"nama_penyakit,omitempty" json:"nama_penyakit,omitempty"`
Deskripsi string `bson:"deskripsi,omitempty" json:"deskripsi,omitempty"`
Obat Obat `bson:"obat,omitempty" json:"obat,omitempty"`
}
func GetAllPenyakit ¶
penyakit
func GetPenyakitByID ¶
func InsertPenyakit ¶
type RumahSakit ¶ added in v0.0.8
type RumahSakit struct {
ID primitive.ObjectID `bson:"_id,omitempty" json:"_id,omitempty"`
Nama_RS string `bson:"nama_rs,omitempty" json:"nama_rs,omitempty"`
No_Telp string `bson:"no_telp,omitempty" json:"no_telp,omitempty"`
Alamat string `bson:"alamat,omitempty" json:"alamat,omitempty"`
Latitude string `bson:"latitude,omitempty" json:"latitude,omitempty"`
Longitude string `bson:"longitude,omitempty" json:"longitude,omitempty"`
Gambar string `bson:"gambar,omitempty" json:"gambar,omitempty"`
Obat Obat `bson:"obat,omitempty" json:"obat,omitempty"`
}
func GetAllRS ¶ added in v0.1.2
func GetAllRS(db *mongo.Database, col string) (rs []RumahSakit, err error)
rumah sakit
type User ¶
type User struct {
ID primitive.ObjectID `bson:"_id,omitempty" json:"_id,omitempty"`
Username string `bson:"username," json:"username,"`
Phone_Number string `bson:"phone_number," json:"phone_number,"`
Password string `bson:"password," json:"password,"`
Confirm_Password string `bson:"confirm_password," json:"confirm_password,"`
}
func GetAllUser ¶ added in v0.1.5
func GetUserByID ¶ added in v0.1.5
Click to show internal directories.
Click to hide internal directories.