Documentation ¶
Index ¶
- func ApproveSewa(_id primitive.ObjectID, db *mongo.Database) (bson.M, error)
- func BayarSewa(_id, iduser primitive.ObjectID, db *mongo.Database, insertedDoc Billboard) (bson.M, error)
- func CheckKode(db *mongo.Database, kode string) bool
- func CheckLatitudeLongitude(db *mongo.Database, latitude, longitude string) bool
- func CheckSewa(db *mongo.Database, idbilllboard primitive.ObjectID) bool
- func DeleteOneDoc(_id primitive.ObjectID, db *mongo.Database, col string) error
- func EditBillboardHandler(PASETOPUBLICKEYENV, MONGOCONNSTRINGENV, dbname string, r *http.Request) string
- func EditBillboardOlehAdmin(_id primitive.ObjectID, db *mongo.Database, r *http.Request) (bson.M, error)
- func EditEmail(iduser primitive.ObjectID, db *mongo.Database, insertedDoc User) (bson.M, error)
- func EditEmailHandler(PASETOPUBLICKEYENV, MONGOCONNSTRINGENV, dbname string, r *http.Request) string
- func EditPassword(iduser primitive.ObjectID, db *mongo.Database, insertedDoc Password) (bson.M, error)
- func EditPasswordHandler(PASETOPUBLICKEYENV, MONGOCONNSTRINGENV, dbname string, r *http.Request) string
- func EditProfile(idparam primitive.ObjectID, db *mongo.Database, r *http.Request) (bson.M, error)
- func EditProfileHandler(PASETOPUBLICKEYENV, MONGOCONNSTRINGENV, dbname string, r *http.Request) string
- func EditSewa(idparam, iduser primitive.ObjectID, db *mongo.Database, r *http.Request) (bson.M, error)
- func EditSewaHandler(PASETOPUBLICKEYENV, MONGOCONNSTRINGENV, dbname string, r *http.Request) string
- func Encode(id primitive.ObjectID, email, privateKey string) (string, error)
- func GCFReturnStruct(DataStuct any) string
- func GenerateKey() (privateKey, publicKey string)
- func GetAllDocs(db *mongo.Database, col string, docs interface{}) interface{}
- func GetBillboarHandler(MONGOCONNSTRINGENV, dbname string, r *http.Request) string
- func GetBillboard(db *mongo.Database) (docs []bson.M, err error)
- func GetID(r *http.Request) string
- func GetProfileHandler(PASETOPUBLICKEYENV, MONGOCONNSTRINGENV, dbname string, r *http.Request) string
- func GetSewaHandler(PASETOPUBLICKEYENV, MONGOCONNSTRINGENV, dbname string, r *http.Request) string
- func HapusBillboardHandler(PASETOPUBLICKEYENV, MONGOCONNSTRINGENV, dbname string, r *http.Request) string
- func HapusBillboardOlehAdmin(_id primitive.ObjectID, db *mongo.Database) error
- func HapusSewa(_id, iduser primitive.ObjectID, db *mongo.Database) error
- func HapusSewaHandler(PASETOPUBLICKEYENV, MONGOCONNSTRINGENV, dbname string, r *http.Request) string
- func InsertOneDoc(db *mongo.Database, col string, doc interface{}) (insertedID primitive.ObjectID, err error)
- func LogInHandler(PASETOPRIVATEKEYENV, MONGOCONNSTRINGENV, dbname string, r *http.Request) string
- func MongoConnect(MongoString, dbname string) *mongo.Database
- func SewaBillboard(idbilllboard, iduser primitive.ObjectID, db *mongo.Database, r *http.Request) (bson.M, error)
- func SewaHandler(PASETOPUBLICKEYENV, MONGOCONNSTRINGENV, dbname string, r *http.Request) string
- func SignUp(db *mongo.Database, insertedDoc User) (string, error)
- func SignUpHandler(MONGOCONNSTRINGENV, dbname string, r *http.Request) string
- func TambahBillboardHandler(PASETOPUBLICKEYENV, MONGOCONNSTRINGENV, dbname string, r *http.Request) string
- func TambahBillboardOlehAdmin(db *mongo.Database, r *http.Request) (bson.M, error)
- func UpdateOneDoc(id primitive.ObjectID, db *mongo.Database, col string, doc interface{}) (err error)
- type Billboard
- type Credential
- type Password
- type Payload
- type Response
- type Sewa
- type User
- func GetUserFromEmail(email string, db *mongo.Database) (doc User, err error)
- func GetUserFromID(_id primitive.ObjectID, db *mongo.Database) (doc User, err error)
- func GetUserFromKTP(ktp string, db *mongo.Database) (doc User, err error)
- func LogIn(db *mongo.Database, insertedDoc User) (user User, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApproveSewa ¶ added in v0.1.1
func CheckLatitudeLongitude ¶
func EditBillboardHandler ¶
func EditBillboardOlehAdmin ¶
func EditEmailHandler ¶ added in v0.0.6
func EditPassword ¶ added in v0.0.6
func EditPasswordHandler ¶ added in v0.0.6
func EditProfile ¶ added in v0.0.6
func EditProfileHandler ¶ added in v0.0.6
func EditSewaHandler ¶ added in v0.0.2
func GenerateKey ¶
func GenerateKey() (privateKey, publicKey string)
func GetAllDocs ¶
crud
func GetBillboarHandler ¶
func GetBillboard ¶ added in v0.0.2
billboard
func GetProfileHandler ¶
func GetSewaHandler ¶ added in v0.0.2
func HapusBillboardHandler ¶
func HapusBillboardOlehAdmin ¶
func HapusSewaHandler ¶ added in v0.0.2
func InsertOneDoc ¶
func LogInHandler ¶
func SewaBillboard ¶ added in v0.0.2
func SewaBillboard(idbilllboard, iduser primitive.ObjectID, db *mongo.Database, r *http.Request) (bson.M, error)
sewa
func SewaHandler ¶ added in v0.0.2
sewa
func TambahBillboardHandler ¶
Types ¶
type Billboard ¶
type Billboard struct { ID primitive.ObjectID `bson:"_id,omitempty" json:"_id,omitempty"` Kode string `bson:"kode,omitempty" json:"kode,omitempty"` Nama string `bson:"nama,omitempty" json:"nama,omitempty"` Gambar string `bson:"gambar,omitempty" json:"gambar,omitempty"` Panjang string `bson:"panjang,omitempty" json:"panjang,omitempty"` Lebar string `bson:"lebar,omitempty" json:"lebar,omitempty"` Harga string `bson:"harga,omitempty" json:"harga,omitempty"` Latitude string `bson:"latitude,omitempty" json:"latitude,omitempty"` Longitude string `bson:"longitude,omitempty" json:"longitude,omitempty"` Address string `bson:"address,omitempty" json:"address,omitempty"` Regency string `bson:"regency,omitempty" json:"regency,omitempty"` District string `bson:"district,omitempty" json:"district,omitempty"` Village string `bson:"village,omitempty" json:"village,omitempty"` }
type Credential ¶
type Payload ¶
type Sewa ¶
type Sewa struct { ID primitive.ObjectID `bson:"_id,omitempty" json:"_id,omitempty"` Billboard Billboard `bson:"billboard,omitempty" json:"billboard,omitempty"` User User `bson:"user,omitempty" json:"user,omitempty"` Content string `bson:"content,omitempty" json:"content,omitempty"` TanggalMulai string `bson:"tanggal_mulai,omitempty" json:"tanggal_mulai,omitempty"` TanggalSelesai string `bson:"tanggal_selesai,omitempty" json:"tanggal_selesai,omitempty"` Bayar bool `bson:"bayar,omitempty" json:"bayar,omitempty"` Status bool `bson:"status,omitempty" json:"status,omitempty"` }
func GetAllSewaByUser ¶ added in v0.0.2
type User ¶
type User struct { ID primitive.ObjectID `bson:"_id,omitempty" json:"_id,omitempty"` NamaLengkap string `bson:"namalengkap,omitempty" json:"namalengkap,omitempty"` Email string `bson:"email,omitempty" json:"email,omitempty"` Password string `bson:"password,omitempty" json:"password,omitempty"` Confirmpassword string `bson:"confirmpass,omitempty" json:"confirmpass,omitempty"` NoHp string `bson:"nohp,omitempty" json:"nohp,omitempty"` KTP string `bson:"ktp,omitempty" json:"ktp,omitempty"` Gambar string `bson:"gambar,omitempty" json:"gambar,omitempty"` Salt string `bson:"salt,omitempty" json:"salt,omitempty"` }
func GetUserFromEmail ¶
func GetUserFromID ¶
get user
func GetUserFromKTP ¶ added in v0.0.3
Click to show internal directories.
Click to hide internal directories.