Documentation ¶
Index ¶
- func AmbilDataBerita(mongoenv, dbname, collname string) string
- func AmbilDataGeojson(mongoenv, dbname, collname string) string
- func AmbilDataGeojsonHeader(mongoenv, dbname, collname string, r *http.Request) string
- func AmbilDataJadwal(mongoenv, dbname, collname string) string
- func AmbilDataKegiatan(mongoenv, dbname, collname string) string
- func AmbilSatuBerita(mongoenv, dbname, collname string, r *http.Request) string
- func CheckPasswordHash(password, hash string) bool
- func CompareUsername(mongoenv *mongo.Database, collname, username string) bool
- func CreateNewUserRole(mongoenv *mongo.Database, collname string, userdata User) interface{}
- func CreateUserAndAddedToeken(privatekey string, mongoenv *mongo.Database, collname string, userdata User) interface{}
- func DeleteUser(mongoenv *mongo.Database, collname string, userdata User) interface{}
- func HapusUser(mongoenv, dbname, collname string, r *http.Request) string
- func HashPassword(password string) (string, error)
- func InsertBerita(mongoenv *mongo.Database, ...) (InsertedID interface{})
- func InsertUserdata(mongoenv *mongo.Database, collname, username, role, password string) (InsertedID interface{})
- func IsPasswordValid(mongoenv *mongo.Database, collname string, userdata User) bool
- func LoginUser(privatekey, mongoenv, dbname, collname string, r *http.Request) string
- func MemasukkanKoordinat(MongoConn *mongo.Database, colname string, coordinate []float64, ...) (InsertedID interface{})
- func MembuatGeojsonPoint(mongoenv, dbname, collname string, r *http.Request) string
- func MembuatGeojsonPointHeader(mongoenv, dbname, collname string, r *http.Request) string
- func MembuatGeojsonPolygon(mongoenv, dbname, collname string, r *http.Request) string
- func MembuatGeojsonPolygonHeader(mongoenv, dbname, collname string, r *http.Request) string
- func MembuatGeojsonPolyline(mongoenv, dbname, collname string, r *http.Request) string
- func MembuatGeojsonPolylineHeader(mongoenv, dbname, collname string, r *http.Request) string
- func PostLinestring(mongoconn *mongo.Database, collection string, linestringdata GeoJsonLineString) interface{}
- func PostPoint(mongoconn *mongo.Database, collection string, pointdata GeoJsonPoint) interface{}
- func PostPolygon(mongoconn *mongo.Database, collection string, polygondata GeoJsonPolygon) interface{}
- func PostStructWithToken[T any](tokenkey string, tokenvalue string, structname interface{}, urltarget string) (result T, errormessage string)
- func RegistrasiUser(mongoenv, dbname, collname string, r *http.Request) string
- func ReplaceOneDoc(mongoenv *mongo.Database, collname string, filter bson.M, userdata User) interface{}
- func ReturnStruct(DataStuct any) string
- func SetConnection(mongoenv, dbname string) *mongo.Database
- func TambahBerita(mongoenv, dbname, collname string, r *http.Request) string
- type Berita
- type Coordinate
- type Credential
- type GeoJson
- type GeoJsonLineString
- type GeoJsonPoint
- type GeoJsonPolygon
- type Geometry
- type GeometryLineString
- type GeometryPoint
- type GeometryPolygon
- type Jadwal
- type Jaja
- type Kegiatan
- type Pesan
- type PostToken
- type Properties
- type Response
- type ResponseDataUser
- type Token
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AmbilDataBerita ¶ added in v1.0.1
func AmbilDataGeojson ¶
func AmbilDataGeojsonHeader ¶
func AmbilDataJadwal ¶
func AmbilDataKegiatan ¶
func AmbilSatuBerita ¶ added in v1.0.1
func CheckPasswordHash ¶
func CompareUsername ¶
func CreateNewUserRole ¶
func DeleteUser ¶
func HashPassword ¶
func InsertBerita ¶ added in v1.0.1
func InsertUserdata ¶
func IsPasswordValid ¶
func MemasukkanKoordinat ¶
func MembuatGeojsonPoint ¶
func MembuatGeojsonPolygon ¶
func MembuatGeojsonPolyline ¶
func PostLinestring ¶
func PostLinestring(mongoconn *mongo.Database, collection string, linestringdata GeoJsonLineString) interface{}
func PostPoint ¶
func PostPoint(mongoconn *mongo.Database, collection string, pointdata GeoJsonPoint) interface{}
func PostPolygon ¶
func PostPolygon(mongoconn *mongo.Database, collection string, polygondata GeoJsonPolygon) interface{}
func PostStructWithToken ¶
func RegistrasiUser ¶
func ReplaceOneDoc ¶
func ReturnStruct ¶
func SetConnection ¶
Types ¶
type Berita ¶ added in v1.0.1
type Berita struct { ID string `json:"id" bson:"id"` Kategori string `json:"kategori" bson:"kategori"` Judul string `json:"judul" bson:"judul"` Preview string `json:"preview" bson:"preview"` Konten string `json:"konten" bson:"konten"` }
func FindBerita ¶ added in v1.0.1
type Coordinate ¶
type Credential ¶
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"` }
type GeoJsonPoint ¶
type GeoJsonPoint struct { Type string `json:"type" bson:"type"` Properties Properties `json:"properties" bson:"properties"` Geometry GeometryPoint `json:"geometry" bson:"geometry"` }
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 Jadwal ¶
type Jaja ¶
type Jaja struct { Status bool `json:"status" bson:"status"` Message string `json:"message" bson:"message"` Data interface{} `json:"data" bson:"data"` }
func CreateResponse ¶
type Kegiatan ¶
type Properties ¶
type Properties struct {
Name string `json:"name" bson:"name"`
}
type Response ¶
type Response struct {
Token string `json:"token,omitempty" bson:"token,omitempty"`
}
type ResponseDataUser ¶
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 FindUserUser ¶
Click to show internal directories.
Click to hide internal directories.