Documentation ¶
Index ¶
- func CompareHashPass(password, hash string) bool
- func CreateAdmin(mongoconn *mongo.Database, collection string, admindata Admin) interface{}
- func CreateAdminAndAddToken(privateKeyEnv string, mongoconn *mongo.Database, collection string, ...) error
- func CreateNewAdminRole(mongoconn *mongo.Database, collection string, admindata Admin) interface{}
- func CreateNewHp(mongoconn *mongo.Database, collection string, hpdata Hp) interface{}
- func DecodeGetHp(PublicKey, tokenStr string) (pay string, err error)
- func DeleteAdmin(mongoconn *mongo.Database, collection string, admindata Admin) interface{}
- func DeleteHp(mongoconn *mongo.Database, collection string, hpdata Hp) interface{}
- func DeleteOneDoc(_id primitive.ObjectID, db *mongo.Database, col string) error
- func GCFDeleteHp(publickey, MONGOCONNSTRINGENV, dbname, colladmin, collhp string, ...) string
- func GCFGetAllHp(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFGetAllHpID(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFGetAllHpg(publickey, Mongostring, dbname, colname string, r *http.Request) string
- func GCFInsertHp(publickey, MONGOCONNSTRINGENV, dbname, colladmin, collhp string, ...) string
- func GCFReturnStruct(DataStuct any) string
- func GCFUpdateHp(publickey, MONGOCONNSTRINGENV, dbname, colladmin, collhp string, ...) string
- func GetAllDataHps(PublicKey, MongoEnv, dbname, colname string, r *http.Request) string
- func GetAllDocs(db *mongo.Database, col string, docs interface{}) interface{}
- func HashPass(password string) (string, error)
- func InsertAdmindata(MongoConn *mongo.Database, email, role, password string) (InsertedID interface{})
- func InsertOneDoc(db *mongo.Database, collection string, doc interface{}) (insertedID interface{})
- func IsExist(Tokenstr, PublicKey string) bool
- func IsPasswordValid(mongoconn *mongo.Database, collection string, admindata Admin) bool
- func Login(Privatekey, MongoEnv, dbname, Colname string, r *http.Request) string
- func MongoCreateConnection(MongoString, dbname string) *mongo.Database
- func Register(Mongoenv, dbname string, r *http.Request) string
- func ReturnStringStruct(Data any) string
- func SetConnection(MONGOCONNSTRINGENV, dbname string) *mongo.Database
- func UpdateOneDoc(id primitive.ObjectID, db *mongo.Database, col string, doc interface{}) (err error)
- func UpdatedHp(mongoconn *mongo.Database, collection string, filter bson.M, hpdata Hp) interface{}
- type About
- type Admin
- type Credential
- type Hp
- type Payload
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompareHashPass ¶ added in v0.0.4
func CreateAdmin ¶
func CreateAdminAndAddToken ¶ added in v0.0.6
func CreateNewAdminRole ¶ added in v0.0.2
admin
func CreateNewHp ¶ added in v0.0.4
hp
func DecodeGetHp ¶ added in v0.0.6
func DeleteAdmin ¶ added in v0.0.6
func GCFDeleteHp ¶ added in v0.0.4
func GCFDeleteHp(publickey, MONGOCONNSTRINGENV, dbname, colladmin, collhp string, r *http.Request) string
delete Hp
func GCFGetAllHp ¶ added in v0.0.4
get all hp
func GCFGetAllHpID ¶ added in v0.0.4
get all hp by id
func GCFGetAllHpg ¶ added in v0.0.6
func GCFInsertHp ¶ added in v0.0.4
func GCFInsertHp(publickey, MONGOCONNSTRINGENV, dbname, colladmin, collhp string, r *http.Request) string
hp post
func GCFUpdateHp ¶ added in v0.0.4
func GCFUpdateHp(publickey, MONGOCONNSTRINGENV, dbname, colladmin, collhp string, r *http.Request) string
update Hp
func GetAllDataHps ¶ added in v0.0.6
func GetAllDocs ¶
crud
func InsertAdmindata ¶ added in v0.0.6
func InsertOneDoc ¶
func IsPasswordValid ¶
func MongoCreateConnection ¶ added in v0.0.4
func ReturnStringStruct ¶
func SetConnection ¶
func UpdateOneDoc ¶
Types ¶
type Admin ¶
type Admin struct { Email string `json:"email" bson:"email"` Password string `json:"password" bson:"password"` Role string `json:"role,omitempty" bson:"role,omitempty"` Token string `json:"token,omitempty" bson:"token,omitempty"` Private string `json:"private,omitempty" bson:"private,omitempty"` Public string `json:"public,omitempty" bson:"public,omitempty"` }
type Credential ¶
type Hp ¶ added in v0.0.4
Click to show internal directories.
Click to hide internal directories.