Documentation ¶
Index ¶
- func DeleteOneDoc(_id primitive.ObjectID, db *mongo.Database, col string) error
- 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 GetID(r *http.Request) string
- func InsertOneDoc(db *mongo.Database, col string, doc interface{}) (insertedID primitive.ObjectID, err error)
- func MongoConnect(MongoString, dbname string) *mongo.Database
- func SaveFileToGithub(usernameGhp, emailGhp, repoGhp, path string, r *http.Request) (string, error)
- func UpdateOneDoc(id primitive.ObjectID, db *mongo.Database, col string, doc interface{}) (err error)
- type ChargingSatation
- type Credential
- type Payload
- type Response
- type Transaksi
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateKey ¶
func GenerateKey() (privateKey, publicKey string)
func GetAllDocs ¶
crud
func InsertOneDoc ¶
func SaveFileToGithub ¶
save file to github
Types ¶
type ChargingSatation ¶
type ChargingSatation struct { ID primitive.ObjectID `bson:"_id,omitempty" json:"_id,omitempty"` ChargingKode string `bson:"chargingkode,omitempty" json:"chargingkode,omitempty"` Nama string `bson:"nama,omitempty" json:"nama,omitempty"` Alamat string `bson:"alamat,omitempty" json:"alamat,omitempty"` AmmountPlugs int `bson:"ammountplugs,omitempty" json:"ammountplugs,omitempty"` Daya string `bson:"daya,omitempty" json:"daya,omitempty"` Connector string `bson:"connector,omitempty" json:"connector,omitempty"` Harga string `bson:"harga,omitempty" json:"harga,omitempty"` Image string `bson:"image,omitempty" json:"image,omitempty"` NomorTelepon string `bson:"nomortelepon,omitempty" json:"nomortelepon,omitempty"` JamOperasional string `bson:"jamoperasional,omitempty" json:"jamoperasional,omitempty"` Longitude string `bson:"longitude,omitempty" json:"longitude,omitempty"` Latitude string `bson:"latitude,omitempty" json:"latitude,omitempty"` }
type Credential ¶
type Payload ¶
type Transaksi ¶
type Transaksi struct { ID primitive.ObjectID `bson:"_id,omitempty" json:"_id,omitempty"` ChargingSatation ChargingSatation `bson:"chargingsatation,omitempty" json:"chargingsatation,omitempty"` User User `bson:"user,omitempty" json:"user,omitempty"` Tanggal string `bson:"tanggal,omitempty" json:"tanggal,omitempty"` StartTime time.Time `bson:"starttime,omitempty" json:"starttime,omitempty"` EndTime time.Time `bson:"endtime,omitempty" json:"endtime,omitempty"` TotalPrice string `bson:"totalprice,omitempty" json:"totalprice,omitempty"` Status int `bson:"status,omitempty" json:"status,omitempty"` }
type User ¶
type User struct { ID primitive.ObjectID `bson:"_id,omitempty" json:"_id,omitempty"` NamaLengkap string `bson:"namalengkap,omitempty" json:"namalengkap,omitempty"` NomorHp string `bson:"nomorhp,omitempty" json:"nomorhp,omitempty"` NamaKendaraan string `bson:"namakendaraan,omitempty" json:"namakendaraan,omitempty"` NomorPolisi string `bson:"nomorpolisi,omitempty" json:"nomorpolisi,omitempty"` Email string `bson:"email,omitempty" json:"email,omitempty"` Password string `bson:"password,omitempty" json:"password,omitempty"` Image string `bson:"image,omitempty" json:"image,omitempty"` Confirmpassword string `bson:"confirmpass,omitempty" json:"confirmpass,omitempty"` Salt string `bson:"salt,omitempty" json:"salt,omitempty"` }
Click to show internal directories.
Click to hide internal directories.