Documentation ¶
Index ¶
- func CheckPasswordHash(password, hash string) bool
- func DeleteDataTicket(Mongoenv, dbname string, r *http.Request) string
- func DeleteDataTransaksi(Mongoenv, dbname string, r *http.Request) string
- func DeleteOneDoc(db *mongo.Database, col string, filter bson.M) (err error)
- func DeleteTicket(db *mongo.Database, col string, _id primitive.ObjectID) (status bool, err error)
- func DeleteTransaksi(db *mongo.Database, col string, _id primitive.ObjectID) (status bool, err error)
- func GCFReturnStruct(DataStuct any) string
- func GetAllData(MONGOCONNSTRINGENV, dbname, collectionname string) string
- func GetAllDocs(db *mongo.Database, col string, docs interface{}) interface{}
- func GetDataReview(MONGOCONNSTRINGENV, dbname, collectionname string) string
- func GetDataTransaksi(MONGOCONNSTRINGENV, dbname, collectionname string) string
- func GetOneDataTicket(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GetOneDataTransaksi(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func HashPassword(password string) (string, error)
- func InsertDataPesan(Mongoenv, dbname string, r *http.Request) string
- func InsertDataTicket(Mongoenv, dbname string, r *http.Request) string
- func InsertDataTransaksi(Mongoenv, dbname string, r *http.Request) string
- func InsertOneDoc(db *mongo.Database, col string, docs interface{}) (insertedID primitive.ObjectID, err error)
- func InsertPesanReview(db *mongo.Database, col string, pesandata Pesan) (insertedID primitive.ObjectID, err error)
- func InsertTicket(db *mongo.Database, col string, ticketdata Ticket) (insertedID primitive.ObjectID, err error)
- func InsertTransaksi(db *mongo.Database, col string, transaksidata Transaksi) (insertedID primitive.ObjectID, err error)
- func InsertUser(db *mongo.Database, collection string, userdata User) string
- func IsPasswordValid(mongoconn *mongo.Database, collection string, userdata User) bool
- func Login(PASETOPRIVATEKEYENV, MONGOCONNSTRINGENV, dbname, collectionname string, ...) string
- func SetConnection(MONGOCONNSTRINGENV, dbname string) *mongo.Database
- func UpdateDataTicket(Mongoenv, dbname string, r *http.Request) string
- func UpdateDataTransaksi(Mongoenv, dbname string, r *http.Request) string
- func UpdateOneDoc(db *mongo.Database, col string, filter, update interface{}) (err error)
- type Credential
- type Pesan
- type Ticket
- type Transaksi
- func GetAllDataTransaksi(db *mongo.Database, col string) (transaksilist []Transaksi)
- func GetTransaksiFromID(db *mongo.Database, col string, _id primitive.ObjectID) (*Transaksi, error)
- func UpdateTransaksi(db *mongo.Database, col string, transaksi Transaksi) (transaksis Transaksi, status bool, err error)
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPasswordHash ¶
func DeleteDataTicket ¶ added in v0.0.2
delete
func DeleteDataTransaksi ¶ added in v0.0.3
func DeleteTicket ¶ added in v0.0.2
delete
func DeleteTransaksi ¶ added in v0.0.3
func GCFReturnStruct ¶
func GetAllDocs ¶
func GetDataReview ¶ added in v0.0.4
func GetDataTransaksi ¶
func GetOneDataTicket ¶ added in v0.0.2
func GetOneDataTransaksi ¶ added in v0.0.3
func HashPassword ¶
func InsertDataPesan ¶ added in v0.0.4
func InsertDataTicket ¶ added in v0.0.2
insert
func InsertDataTransaksi ¶
func InsertOneDoc ¶
func InsertOneDoc(db *mongo.Database, col string, docs interface{}) (insertedID primitive.ObjectID, err error)
docs
func InsertPesanReview ¶ added in v0.0.4
func InsertTicket ¶ added in v0.0.2
func InsertTransaksi ¶
func InsertUser ¶
insert
func IsPasswordValid ¶
func SetConnection ¶
func UpdateDataTicket ¶ added in v0.0.2
update
func UpdateDataTransaksi ¶ added in v0.0.3
Types ¶
type Credential ¶
type Credential struct { Status bool `json:"status" bson:"status"` Token string `json:"token,omitempty" bson:"token,omitempty"` Message string `json:"message,omitempty" bson:"message,omitempty"` Data []Ticket `bson:"data,omitempty" json:"data,omitempty"` DataTransaksi []Transaksi `bson:"datatransaksi,omitempty" json:"datatransaksi,omitempty"` }
type Pesan ¶ added in v0.0.4
type Ticket ¶ added in v0.0.2
type Ticket struct { ID primitive.ObjectID `bson:"_id,omitempty" json:"_id,omitempty"` Nama string `bson:"nama,omitempty" json:"nama,omitempty"` Harga string `bson:"harga,omitempty" json:"harga,omitempty"` Deskripsi string `bson:"deskripsi,omitempty" json:"deskripsi,omitempty"` Stok string `bson:"stok,omitempty" json:"stok,omitempty"` }
func GetAllDataTicket ¶ added in v0.0.2
get
func GetTicketFromID ¶ added in v0.0.2
type Transaksi ¶
type Transaksi struct { ID primitive.ObjectID `bson:"_id,omitempty" json:"_id,omitempty"` NamaTicket string `bson:"namaticket,omitempty" json:"namaticket,omitempty"` Harga string `bson:"harga,omitempty" json:"harga,omitempty"` NamaPembeli string `bson:"namapembeli,omitempty" json:"namapembeli,omitempty"` Email string `bson:"email,omitempty" json:"email,omitempty"` Alamat string `bson:"alamat,omitempty" json:"alamat,omitempty"` NoHP string `bson:"nohp,omitempty" json:"nohp,omitempty"` Quantity string `bson:"quantity,omitempty" json:"quantity,omitempty"` Total string `bson:"total,omitempty" json:"total,omitempty"` }
func GetAllDataTransaksi ¶
func GetTransaksiFromID ¶ added in v0.0.3
Click to show internal directories.
Click to hide internal directories.