Documentation ¶
Index ¶
- func AuthenticateUserAndGenerateToken(privateKeyEnv string, mongoconn *mongo.Database, collection string, ...) (string, error)
- func CheckPasswordHash(password, hash string) bool
- func CreateComment(mongoconn *mongo.Database, collection string, commentdata Comment) interface{}
- func CreateLogin(mongoconn *mongo.Database, collection string, userdata User) interface{}
- func CreateNewBlog(mongoconn *mongo.Database, collection string, blogdata Blog) interface{}
- func CreateNewContent(mongoconn *mongo.Database, collection string, contentdata Content) interface{}
- func CreateNewProduct(mongoconn *mongo.Database, collection string, productdata Product) interface{}
- func CreateNewUserRole(mongoconn *mongo.Database, collection string, userdata User) interface{}
- func CreateUser(mongoconn *mongo.Database, collection string, userdata User) interface{}
- func CreateUserAndAddToken(privateKeyEnv string, mongoconn *mongo.Database, collection string, ...) error
- func CreateUserAndAddedToeken(PASETOPRIVATEKEYENV string, mongoconn *mongo.Database, collection string, ...) interface{}
- func DeleteComment(mongoconn *mongo.Database, collection string, commentdata Comment) interface{}
- func DeleteContent(mongoconn *mongo.Database, collection string, contentdata Content) interface{}
- func DeleteLinestring(mongoconn *mongo.Database, collection string, linestringdata GeoJsonLineString) interface{}
- func DeleteUser(mongoconn *mongo.Database, collection string, userdata User) interface{}
- func GCFCreateAccountAndToken(PASETOPRIVATEKEYENV, MONGOCONNSTRINGENV, dbname, collectionname string, ...) string
- func GCFCreateContent(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFCreateHandler(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFCreateHandlerTokenPaseto(PASETOPRIVATEKEYENV, MONGOCONNSTRINGENV, dbname, collectionname string, ...) string
- func GCFCreateLineStringgg(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFCreateNewBlog(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFCreatePolygone(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFCreatePolygonee(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFCreatePostLineString(MONGOCONNSTRINGENV, dbname, collection string, r *http.Request) string
- func GCFCreatePostLineStringg(MONGOCONNSTRINGENV, dbname, collection string, r *http.Request) string
- func GCFCreateTokenAndSaveToDB(PASETOPRIVATEKEYENV, MONGOCONNSTRINGENV, dbname, collectionname string, ...) (string, error)
- func GCFCreteCommnet(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFCreteRegister(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFDeleteHandler(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFDeleteHandlerContent(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFDeleteLineString(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFDeletedCommnet(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFFindBlogAllID(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFFindContentAllID(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFFindUserByID(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFFindUserByName(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFGetAllBlog(MONGOCONNSTRINGENV, dbname, collectionname string) string
- func GCFGetAllComment(MONGOCONNSTRINGENV, dbname, collectionname string) string
- func GCFGetAllContentBy(MONGOCONNSTRINGENV, dbname, collectionname string) string
- func GCFGetAllProduct(MONGOCONNSTRINGENV, dbname, collectionname string) string
- func GCFHandler(MONGOCONNSTRINGENV, dbname, collectionname string) string
- func GCFLoginAfterCreate(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFLoginAfterCreatee(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFLoginAfterCreateee(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFLoginAfterCreateeee(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFLoginAfterCreater(MONGOCONNSTRINGENV, dbname, collectionname, privateKeyEnv string, ...) (string, error)
- func GCFLoginTest(username, password, MONGOCONNSTRINGENV, dbname, collectionname string) bool
- func GCFPoint(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFPostHandler(PASETOPRIVATEKEYENV, MONGOCONNSTRINGENV, dbname, collectionname string, ...) string
- func GCFReturnStruct(DataStuct any) string
- func GCFUpdateHandler(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFUpdateLinestring(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFUpdatedContent(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GCFlineStingCreate(MONGOCONNSTRINGENV, dbname, collection string, r *http.Request) string
- func GCFlineStingCreatea(MONGOCONNSTRINGENV, dbname, collection string, r *http.Request) string
- func GFCPostHandlerUser(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func GFCUpadatedCommnet(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) string
- func HashPassword(password string) (string, error)
- func InsertDataUserGCF(Mongoenv, dbname string, r *http.Request) string
- func InsertOneDoc(db *mongo.Database, collection string, doc interface{}) (insertedID interface{})
- func InsertUserdata(MongoConn *mongo.Database, username, role, password string) (InsertedID interface{})
- func IsPasswordValid(mongoconn *mongo.Database, collection string, userdata User) bool
- func PostLineString(mongoconn *mongo.Database, collection string, commentdata GeoJsonLineString) interface{}
- func PostLinestring(mongoconn *mongo.Database, collection string, linestringdata GeoJsonLineString) interface{}
- func PostPoint(mongoconn *mongo.Database, collection string, pointdata GeometryPoint) interface{}
- func PostPolygone(mongoconn *mongo.Database, collection string, polygonedata GeoJsonPolygon) interface{}
- func ReplaceContent(mongoconn *mongo.Database, collection string, filter bson.M, ...) interface{}
- func ReplaceOneDoc(mongoconn *mongo.Database, collection string, filter bson.M, userdata User) interface{}
- func SetConnection(MONGOCONNSTRINGENV, dbname string) *mongo.Database
- func UpdatedComment(mongoconn *mongo.Database, collection string, filter bson.M, ...) interface{}
- func UpdatedLinestring(mongoconn *mongo.Database, collection string, filter bson.M, ...) interface{}
- type About
- type Blog
- type Category
- type Comment
- type Contack
- type Content
- type Credential
- type Event
- type EventGlobal
- type Gallery
- type GeoJson
- type GeoJsonLineString
- type GeoJsonPolygon
- type Geometry
- type GeometryLineString
- type GeometryPoint
- type GeometryPolygon
- type Iklan
- type Product
- type Properties
- type Response
- type Share
- type Tags
- type User
- func FindUser(mongoconn *mongo.Database, collection string, userdata User) User
- func FindUserByUsername(mongoconn *mongo.Database, collection string, username string) (User, error)
- func FindUserUser(mongoconn *mongo.Database, collection string, userdata User) User
- func GetAllUser(mongoconn *mongo.Database, collection string) []User
- func GetNameAndPassowrd(mongoconn *mongo.Database, collection string) []User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthenticateUserAndGenerateToken ¶ added in v1.0.1
func CheckPasswordHash ¶
func CreateComment ¶ added in v1.0.1
func CreateLogin ¶ added in v1.0.1
create login using Private
func CreateNewBlog ¶ added in v1.0.1
func CreateNewContent ¶ added in v1.0.1
func CreateNewContent(mongoconn *mongo.Database, collection string, contentdata Content) interface{}
content
func CreateNewProduct ¶ added in v1.0.1
func CreateNewUserRole ¶ added in v1.0.1
func GetAllUser(mongoconn *mongo.Database, collection string) []User { user := atdb.GetAllDoc[[]User](mongoconn, collection) return user }
func CreateUser ¶ added in v1.0.1
func CreateUserAndAddToken ¶ added in v1.0.1
func CreateUserAndAddedToeken ¶ added in v1.0.1
func DeleteComment ¶ added in v1.0.1
func DeleteContent ¶ added in v1.0.1
func DeleteLinestring ¶ added in v1.0.1
func DeleteLinestring(mongoconn *mongo.Database, collection string, linestringdata GeoJsonLineString) interface{}
func DeleteUser ¶ added in v1.0.1
func GCFCreateAccountAndToken ¶ added in v1.0.1
func GCFCreateContent ¶ added in v1.0.1
func GCFCreateHandler ¶ added in v1.0.1
func GCFCreateHandlerTokenPaseto ¶ added in v1.0.1
func GCFCreateLineStringgg ¶ added in v1.0.1
func GCFCreateNewBlog ¶ added in v1.0.1
func GCFCreatePolygone ¶ added in v1.0.1
func GCFCreatePolygonee ¶ added in v1.0.1
func GCFCreatePostLineString ¶ added in v1.0.1
func GCFCreatePostLineStringg ¶ added in v1.0.1
func GCFCreateTokenAndSaveToDB ¶ added in v1.0.1
func GCFCreteCommnet ¶ added in v1.0.1
func GCFCreteRegister ¶ added in v1.0.1
func GCFDeleteHandler ¶ added in v1.0.1
func GCFDeleteHandlerContent ¶ added in v1.0.1
func GCFDeleteLineString ¶ added in v1.0.1
func GCFDeletedCommnet ¶ added in v1.0.1
func GCFFindBlogAllID ¶ added in v1.0.1
func GCFFindContentAllID ¶ added in v1.0.1
func GCFFindUserByID ¶ added in v1.0.1
func GCFFindUserByName ¶ added in v1.0.1
func GCFGetAllBlog ¶ added in v1.0.1
func GCFGetAllComment ¶ added in v1.0.1
func GCFGetAllContentBy ¶ added in v1.0.1
func GCFGetAllProduct ¶ added in v1.0.1
product
func GCFHandler ¶
func GCFLoginAfterCreate ¶ added in v1.0.1
func GCFLoginAfterCreatee ¶ added in v1.0.1
func GCFLoginAfterCreateee ¶ added in v1.0.1
func GCFLoginAfterCreateeee ¶ added in v1.0.1
func GCFLoginAfterCreater ¶ added in v1.0.1
func GCFLoginTest ¶ added in v1.0.1
func GCFPostHandler ¶
func GCFReturnStruct ¶
func GCFUpdateHandler ¶ added in v1.0.1
func GCFUpdateLinestring ¶ added in v1.0.1
func GCFUpdatedContent ¶ added in v1.0.1
func GCFlineStingCreate ¶ added in v1.0.1
func GCFlineStingCreatea ¶ added in v1.0.1
func GFCPostHandlerUser ¶ added in v1.0.1
func GFCUpadatedCommnet ¶ added in v1.0.1
func HashPassword ¶
func InsertDataUserGCF ¶ added in v1.0.1
func InsertOneDoc ¶ added in v1.0.1
func InsertUserdata ¶ added in v1.0.1
func IsPasswordValid ¶
func PostLineString ¶ added in v1.0.1
func PostLineString(mongoconn *mongo.Database, collection string, commentdata GeoJsonLineString) interface{}
func PostLinestring ¶ added in v1.0.1
func PostLinestring(mongoconn *mongo.Database, collection string, linestringdata GeoJsonLineString) interface{}
func PostPoint ¶ added in v1.0.1
func PostPoint(mongoconn *mongo.Database, collection string, pointdata GeometryPoint) interface{}
func PostPolygone ¶ added in v1.0.1
func PostPolygone(mongoconn *mongo.Database, collection string, polygonedata GeoJsonPolygon) interface{}
func ReplaceContent ¶ added in v1.0.1
func ReplaceOneDoc ¶ added in v1.0.1
func SetConnection ¶
func UpdatedComment ¶ added in v1.0.1
func UpdatedLinestring ¶ added in v1.0.1
Types ¶
type Blog ¶ added in v1.0.1
type Blog struct { ID int `json:"id" bson:"id"` Title string `json:"title" bson:"title"` Tanggal string `json:"tanggal" bson:"tanggal"` Description string `json:"judul" bson:"judul"` Content []Content `json:"content" bson:"content"` }
func GetAllBlogAll ¶ added in v1.0.1
type Category ¶ added in v1.0.1
type Category struct {
Category []string `json:"category" bson:"category"`
}
type Comment ¶ added in v1.0.1
type Content ¶ added in v1.0.1
type Content struct { ID int `json:"id" bson:"id" ` Content string `json:"content" bson:"content"` Image string `json:"image" bson:"image"` Description string `json:"description" bson:"description"` }
func FindContentAllId ¶ added in v1.0.1
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"` }
func GCFCreateProduct ¶ added in v1.0.1
func GCFCreateProduct(MONGOCONNSTRINGENV, dbname, collectionname string, r *http.Request) Credential
type Event ¶ added in v1.0.1
type Event struct { ID int `json:"id" bson:"id"` Title string `json:"title" bson:"title"` Description string `json:"description" bson:"description"` Tanggal string `json:"tanggal" bson:"tanggal"` Image string `json:"image" bson:"image"` Harga int `json:"harga" bson:"harga"` LinkYoutube string `json:"linkyoutube" bson:"linkyoutube"` }
type EventGlobal ¶ added in v1.0.1
type GeoJson ¶
type GeoJson struct { Type string `json:"type" bson:"type"` Properties Properties `json:"properties" bson:"properties"` Geometry Geometry `json:"geometry" bson:"geometry"` }
type GeoJsonLineString ¶
type GeoJsonLineString struct { Type string `json:"type" bson:"type"` Properties Properties `json:"properties" bson:"properties"` Geometry GeometryLineString `json:"geometry" bson:"geometry"` }
func GetByCoordinate ¶ added in v1.0.1
func GetByCoordinate(mongoconn *mongo.Database, collection string, linestringdata GeoJsonLineString) GeoJsonLineString
type GeoJsonPolygon ¶
type GeoJsonPolygon struct { Type string `json:"type" bson:"type"` Properties Properties `json:"properties" bson:"properties"` Geometry GeometryPolygon `json:"geometry" bson:"geometry"` }
type Geometry ¶
type Geometry struct { Coordinates interface{} `json:"coordinates" bson:"coordinates"` Type string `json:"type" bson:"type"` }
type GeometryLineString ¶
type GeometryPoint ¶
type GeometryPolygon ¶
type Product ¶ added in v1.0.1
type Product struct { ID primitive.ObjectID `bson:"_id,omitempty" ` Nomorid int `json:"nomorid" bson:"nomorid"` Name string `json:"name" bson:"name"` Description string `json:"description" bson:"description"` Price int `json:"price" bson:"price"` Stock int `json:"stock" bson:"stock"` Size string `json:"size" bson:"size"` Image string `json:"image" bson:"image"` }
type Properties ¶
type Properties struct {
Name string `json:"name" bson:"name"`
}
type Response ¶ added in v1.0.1
type Response struct { Status bool `json:"status" bson:"status"` Message string `json:"message" bson:"message"` Data interface{} `json:"data" bson:"data"` }
func CreateResponse ¶ added in v1.0.1
type User ¶
type User struct { Username string `json:"username" bson:"username"` 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"` Publick string `json:"publick,omitempty" bson:"publick,omitempty"` }
func FindUserByUsername ¶ added in v1.0.1
func FindUserUser ¶ added in v1.0.1
func GetAllUser ¶ added in v1.0.1
Click to show internal directories.
Click to hide internal directories.