module

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2024 License: MIT Imports: 19 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Response model.Response

user

Functions

func Decode added in v0.0.5

func Decode(publicKey string, tokenstring string) (payload model.Payload, err error)

func DeleteGudangA added in v0.0.5

func DeleteGudangA(idparam, iduser primitive.ObjectID, db *mongo.Database) error

delete gudang a

func DeleteGudangB added in v0.0.5

func DeleteGudangB(idparam, iduser primitive.ObjectID, db *mongo.Database) error

delete gudang b

func DeleteGudangC added in v0.0.5

func DeleteGudangC(idparam, iduser primitive.ObjectID, db *mongo.Database) error

delete gudang c

func DeleteOneDoc added in v0.0.5

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

func Encode

func Encode(id primitive.ObjectID, role, privateKey string) (string, error)

func GCFHandlerDeleteGudangA added in v0.0.5

func GCFHandlerDeleteGudangA(PASETOPUBLICKEYENV, MONGOCONNSTRINGENV, dbname string, r *http.Request) string

func GCFHandlerDeleteGudangB added in v0.0.5

func GCFHandlerDeleteGudangB(PASETOPUBLICKEYENV, MONGOCONNSTRINGENV, dbname string, r *http.Request) string

func GCFHandlerDeleteGudangC added in v0.0.5

func GCFHandlerDeleteGudangC(PASETOPUBLICKEYENV, MONGOCONNSTRINGENV, dbname string, r *http.Request) string

func GCFHandlerGetAll added in v0.0.5

func GCFHandlerGetAll(MONGOCONNSTRINGENV, dbname, col string, docs interface{}) string

get all

func GCFHandlerGetAllGudangA added in v0.0.5

func GCFHandlerGetAllGudangA(MONGOCONNSTRINGENV, dbname string) string

func GCFHandlerGetAllGudangB added in v0.0.5

func GCFHandlerGetAllGudangB(MONGOCONNSTRINGENV, dbname string) string

func GCFHandlerGetAllGudangC added in v0.0.5

func GCFHandlerGetAllGudangC(MONGOCONNSTRINGENV, dbname string) string

func GCFHandlerGetAllProducts added in v0.2.2

func GCFHandlerGetAllProducts(MONGOCONNSTRINGENV, dbname string) string

func GCFHandlerGetAllStaff added in v0.0.5

func GCFHandlerGetAllStaff(MONGOCONNSTRINGENV, dbname string) string

func GCFHandlerGetAllUserByAdmin added in v0.0.5

func GCFHandlerGetAllUserByAdmin(PASETOPUBLICKEYENV, MONGOCONNSTRINGENV, dbname string, r *http.Request) string

func GCFHandlerGetGudangA added in v0.0.5

func GCFHandlerGetGudangA(PASETOPUBLICKEYENV, MONGOCONNSTRINGENV, dbname string, r *http.Request) string

func GCFHandlerGetGudangAFromID added in v0.0.5

func GCFHandlerGetGudangAFromID(PASETOPUBLICKEYENV, MONGOCONNSTRINGENV, dbname string, r *http.Request) string

func GCFHandlerGetGudangB added in v0.0.5

func GCFHandlerGetGudangB(PASETOPUBLICKEYENV, MONGOCONNSTRINGENV, dbname string, r *http.Request) string

func GCFHandlerGetGudangBFromID added in v0.0.5

func GCFHandlerGetGudangBFromID(PASETOPUBLICKEYENV, MONGOCONNSTRINGENV, dbname string, r *http.Request) string

func GCFHandlerGetGudangC added in v0.0.5

func GCFHandlerGetGudangC(PASETOPUBLICKEYENV, MONGOCONNSTRINGENV, dbname string, r *http.Request) string

func GCFHandlerGetGudangCFromID added in v0.0.5

func GCFHandlerGetGudangCFromID(PASETOPUBLICKEYENV, MONGOCONNSTRINGENV, dbname string, r *http.Request) string

func GCFHandlerGetStaffFromID added in v0.0.5

func GCFHandlerGetStaffFromID(PASETOPUBLICKEYENV, MONGOCONNSTRINGENV, dbname string, r *http.Request) string

func GCFHandlerGetUser added in v0.0.5

func GCFHandlerGetUser(PASETOPUBLICKEYENV, MONGOCONNSTRINGENV, dbname string, r *http.Request) string

func GCFHandlerGetUserFromID added in v0.0.5

func GCFHandlerGetUserFromID(PASETOPUBLICKEYENV, MONGOCONNSTRINGENV, dbname string, r *http.Request) string

func GCFHandlerInsertGudangA added in v0.0.5

func GCFHandlerInsertGudangA(PASETOPUBLICKEYENV, MONGOCONNSTRINGENV, dbname string, r *http.Request) string

GudangA

func GCFHandlerInsertGudangB added in v0.0.5

func GCFHandlerInsertGudangB(PASETOPUBLICKEYENV, MONGOCONNSTRINGENV, dbname string, r *http.Request) string

GudangB

func GCFHandlerInsertGudangC added in v0.0.5

func GCFHandlerInsertGudangC(PASETOPUBLICKEYENV, MONGOCONNSTRINGENV, dbname string, r *http.Request) string

GudangC

func GCFHandlerLogin added in v0.0.5

func GCFHandlerLogin(PASETOPRIVATEKEYENV, MONGOCONNSTRINGENV, dbname string, r *http.Request) string

login

func GCFHandlerSearchProductByName added in v0.2.4

func GCFHandlerSearchProductByName(MONGOCONNSTRINGENV, dbname string, r *http.Request) string

func GCFHandlerSignUpStaff added in v0.0.5

func GCFHandlerSignUpStaff(MONGOCONNSTRINGENV, dbname string, r *http.Request) string

signup

func GCFHandlerUpdateGudangA added in v0.0.5

func GCFHandlerUpdateGudangA(PASETOPUBLICKEYENV, MONGOCONNSTRINGENV, dbname string, r *http.Request) string

func GCFHandlerUpdateGudangB added in v0.0.5

func GCFHandlerUpdateGudangB(PASETOPUBLICKEYENV, MONGOCONNSTRINGENV, dbname string, r *http.Request) string

func GCFHandlerUpdateGudangC added in v0.0.5

func GCFHandlerUpdateGudangC(PASETOPUBLICKEYENV, MONGOCONNSTRINGENV, dbname string, r *http.Request) string

func GCFHandlerUpdateStaff added in v0.0.5

func GCFHandlerUpdateStaff(PASETOPUBLICKEYENV, MONGOCONNSTRINGENV, dbname string, r *http.Request) string

staff

func GCFHandlerUpdateUser added in v0.0.5

func GCFHandlerUpdateUser(PASETOPUBLICKEYENV, MONGOCONNSTRINGENV, dbname string, r *http.Request) string

user

func GCFReturnStruct

func GCFReturnStruct(DataStuct any) string

return struct

func GenerateKey

func GenerateKey() (privateKey, publicKey string)

func GetAllDocs

func GetAllDocs(db *mongo.Database, col string, docs interface{}) interface{}

crud

func GetAllGudangA added in v0.0.5

func GetAllGudangA(db *mongo.Database) (gudanga []model.GudangA, err error)

get all gudang a

func GetAllGudangB added in v0.0.5

func GetAllGudangB(db *mongo.Database) (gudangb []model.GudangB, err error)

get all gudang b

func GetAllGudangC added in v0.0.5

func GetAllGudangC(db *mongo.Database) (gudangc []model.GudangC, err error)

get all gudang c

func GetAllProducts added in v0.2.2

func GetAllProducts(db *mongo.Database) (products []model.Gudang, err error)

Gudang

func GetAllStaff added in v0.0.5

func GetAllStaff(db *mongo.Database) (staff []model.Staff, err error)

func GetAllUser added in v0.0.5

func GetAllUser(db *mongo.Database) (user []model.User, err error)

func GetGudangAFromID added in v0.0.5

func GetGudangAFromID(_id primitive.ObjectID, db *mongo.Database) (gudanga model.GudangA, err error)

Get GudangA FromID

func GetGudangBFromID added in v0.0.5

func GetGudangBFromID(_id primitive.ObjectID, db *mongo.Database) (gudangb model.GudangB, err error)

func GetGudangCFromID added in v0.0.5

func GetGudangCFromID(_id primitive.ObjectID, db *mongo.Database) (gudangc model.GudangC, err error)

func GetID added in v0.0.5

func GetID(r *http.Request) string

get id

func GetProductName added in v0.2.4

func GetProductName(r *http.Request) string

func GetStaffFromAkun added in v0.0.5

func GetStaffFromAkun(id_akun primitive.ObjectID, db *mongo.Database) (doc model.Staff, err error)

func GetStaffFromID added in v0.0.5

func GetStaffFromID(_id primitive.ObjectID, db *mongo.Database) (doc model.Staff, err error)

func GetUser added in v0.0.8

func GetUser(PASETOPUBLICKEYENV, MONGOCONNSTRINGENV, dbname string, r *http.Request) string

func GetUserFromEmail

func GetUserFromEmail(email string, db *mongo.Database) (doc model.User, err error)

func GetUserFromID added in v0.0.5

func GetUserFromID(_id primitive.ObjectID, db *mongo.Database) (doc model.User, err error)

func GetUserLogin added in v0.0.8

func GetUserLogin(PASETOPUBLICKEYENV string, r *http.Request) (model.Payload, error)

get user login

func InsertGudangA added in v0.0.5

func InsertGudangA(_id primitive.ObjectID, db *mongo.Database, insertedDoc model.GudangA) error

Gudang A insert gudang a

func InsertGudangB added in v0.0.5

func InsertGudangB(_id primitive.ObjectID, db *mongo.Database, insertedDoc model.GudangB) error

Gudang B insert gudang b

func InsertGudangC added in v0.0.5

func InsertGudangC(_id primitive.ObjectID, db *mongo.Database, insertedDoc model.GudangC) error

Gudang C insert gudang c

func InsertOneDoc

func InsertOneDoc(db *mongo.Database, col string, doc interface{}) (insertedID primitive.ObjectID, err error)

func LogIn

func LogIn(db *mongo.Database, insertedDoc model.User) (user model.User, err error)

login

func MongoConnect

func MongoConnect(MongoString, warehouse_db string) *mongo.Database

func PutEmail added in v0.0.8

func PutEmail(PASETOPUBLICKEYENV, MONGOCONNSTRINGENV, dbname string, r *http.Request) string

email

func PutPassword added in v0.0.8

func PutPassword(PASETOPUBLICKEYENV, MONGOCONNSTRINGENV, dbname string, r *http.Request) string

password

func SearchProductByName added in v0.2.4

func SearchProductByName(name string, db *mongo.Database) ([]model.SearchResult, error)

func SendWhatsAppConfirmation added in v0.2.1

func SendWhatsAppConfirmation(namalengkap, nohp, email, password string) error

func SignUpStaff added in v0.0.5

func SignUpStaff(db *mongo.Database, insertedDoc model.Staff) error

signup

func UpdateEmailUser added in v0.0.8

func UpdateEmailUser(iduser primitive.ObjectID, db *mongo.Database, insertedDoc model.User) error

email

func UpdateGudangA added in v0.0.5

func UpdateGudangA(idparam, iduser primitive.ObjectID, db *mongo.Database, insertedDoc model.GudangA) error

update gudang a

func UpdateGudangB added in v0.0.5

func UpdateGudangB(idparam, iduser primitive.ObjectID, db *mongo.Database, insertedDoc model.GudangB) error

update gudang b

func UpdateGudangC added in v0.0.5

func UpdateGudangC(idparam, iduser primitive.ObjectID, db *mongo.Database, insertedDoc model.GudangC) error

update gudang b

func UpdateOneDoc

func UpdateOneDoc(id primitive.ObjectID, db *mongo.Database, col string, doc interface{}) (err error)

func UpdatePasswordUser added in v0.0.7

func UpdatePasswordUser(iduser primitive.ObjectID, db *mongo.Database, insertedDoc model.Password) error

update password

func UpdateStaff added in v0.0.5

func UpdateStaff(idparam primitive.ObjectID, db *mongo.Database, insertedDoc model.Staff) error

staff

func UpdateUser added in v0.0.5

func UpdateUser(iduser primitive.ObjectID, db *mongo.Database, insertedDoc model.User) error

user

Types

This section is empty.

Jump to

Keyboard shortcuts

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