peda

package module
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2023 License: MIT Imports: 8 Imported by: 0

README

Indo Cultural Finders

Library Package

go get -u all
go mod tidy
git tag                                 #check current version
git tag v0.0.28                          #set tag version
git push origin --tags                  #push tag version to repo
go list -m github.com/Indoculturafinders/BackendBaru@v1.0.0   #publish to pkg dev, replace ORG/URL with your repo URL

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPasswordHash

func CheckPasswordHash(password, hash string) bool

func CreateUser

func CreateUser(mongoenv, dbname, collname string, r *http.Request) string

func GCFHandler

func GCFHandler(MONGOCONNSTRINGENV, dbname, collectionname string) string

func GCFPostHandler

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

func GCFReturnStruct

func GCFReturnStruct(DataStuct any) string

func HashPassword

func HashPassword(password string) (string, error)

func InsertUserdata

func InsertUserdata(mongoenv *mongo.Database, collname, username, role, password string) (InsertedID interface{})

func IsPasswordValid

func IsPasswordValid(mongoconn *mongo.Database, collection string, userdata User) bool

func MembuatGeojsonPointToken added in v1.0.1

func MembuatGeojsonPointToken(mongoenv, dbname, collname string, r *http.Request) string

func MembuatGeojsonPoligonToken added in v1.0.1

func MembuatGeojsonPoligonToken(mongoenv, dbname, collname string, r *http.Request) string

func MembuatGeojsonPolylineToken added in v1.0.1

func MembuatGeojsonPolylineToken(mongoenv, dbname, collname string, r *http.Request) string

func MengambilGeojsonToken added in v1.0.1

func MengambilGeojsonToken(mongoenv, dbname, collname string, r *http.Request) string

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 GeoJsonPoint) interface{}

func PostPolygon added in v1.0.1

func PostPolygon(mongoconn *mongo.Database, collection string, polygondata GeoJsonPolygon) interface{}

func SetConnection

func SetConnection(MONGOCONNSTRINGENV, dbname string) *mongo.Database

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"`
}

type GeoJson

type GeoJson struct {
	Type       string     `json:"type" bson:"type"`
	Properties Properties `json:"properties" bson:"properties"`
	Geometry   Geometry   `json:"geometry" bson:"geometry"`
}

func GetAllBangunanLineString

func GetAllBangunanLineString(mongoconn *mongo.Database, collection string) []GeoJson

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 added in v1.0.1

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 GeometryLineString struct {
	Coordinates [][]float64 `json:"coordinates" bson:"coordinates"`
	Type        string      `json:"type" bson:"type"`
}

type GeometryPoint

type GeometryPoint struct {
	Coordinates []float64 `json:"coordinates" bson:"coordinates"`
	Type        string    `json:"type" bson:"type"`
}

type GeometryPolygon

type GeometryPolygon struct {
	Coordinates [][][]float64 `json:"coordinates" bson:"coordinates"`
	Type        string        `json:"type" bson:"type"`
}

type Jaja added in v1.0.1

type Jaja 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

func CreateResponse(status bool, message string, data interface{}) Jaja

type Properties

type Properties struct {
	Name string `json:"name" bson:"name"`
}

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"`
}

Jump to

Keyboard shortcuts

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