Versions in this module Expand all Collapse all v1 v1.1.5 Sep 16, 2025 Changes in this version + func APICheck(ip string) bool + func CalculateArea(jsonData *geojson.Feature) float64 + func CalculateAreaByStr(jsonDataStr string) float64 + func CalculateGeodesicArea(jsonData *geojson.Feature) float64 + func CamelCaseToUnderscore(str string) string + func CamelCaseToUnderscore2(str string) string + func ConvertGeoJSONToDXF(featureCollection geojson.FeatureCollection, outputFilename string) + func ConvertToInitials(hanzi string) string + func DLMCReplace(tablename string) string + func DataSearch(query *gorm.DB, jsonData map[string]interface{}) []models.TempLayHeader + func DecryptStr(encryptedB64Str string, key string) string + func DeleteFiles(dirPath string) + func DirectoryExists(dirPath string, folderName string) bool + func EncryptStr(text string, key string) string + func FindShpFile(dir string, ex string) *string + func GeoIntersectLine(jsonData geojson.FeatureCollection, tablename string, attributes []string, ...) []map[string]interface + func GeoJsonToWKB(geo geojson.Feature) string + func GetAllFiles(path string) ([]string, error) + func GetFieldName(i interface{}) []string + func GetIP(net string) []string + func GetIntersectGeo(jsonData geojson.FeatureCollection, tablename string, atts string) geojson.FeatureCollection + func GetMaxItem(text []Result) string + func GetVolume(data []map[string]interface{}) []map[string]interface + func IsStringInSlice(s string, slice []string) bool + func LowerJSONTransform(xmList interface{}) interface + func MakeGeoJSON2(items []map[string]interface{}) interface + func MakeTileIndex(DB *gorm.DB) + func Md5Str(data string) string + func MergeMaps(map1, map2 map[string]interface{}) map[string]interface + func OpenURL(url string) error + func RemoveKeyFromMapArray(input []map[string]interface{}, key string) []map[string]interface + func ReplaceInJSFiles(dir string, oldValue string, newValue string) error + func RestoreData(backupPath string) + func SavaGeojsonToDb(db *gorm.DB, jsonData geojson.FeatureCollection, table interface{}) + func SavaGeojsonToTable(db *gorm.DB, jsonData geojson.FeatureCollection, tablename string) + func SortSchema(TableSchema []models.MySchema) []models.MySchema + func TempDataSearch(query *gorm.DB, jsonData map[string]interface{}) []models.TempGeo + func ToStringSlice(args []interface{}) []string + func Unzip(src string) error + func UnzipRar(src string) error + func UnzipZip(src string) error + func UpdateGeojsonToTable(db *gorm.DB, jsonData geojson.FeatureCollection, tablename string, id int32) + func ZipFileOut(folderPath string) ([]byte, error) + func ZipFolder(folderPath string, name string) error + func ZipFolderTo(folderPath string, outpath string) error + type Att struct + Text string + Value string + type BackupConfig struct + BackupDir string + Compress bool + Database string + Host string + Password string + Port string + RetentionDays int + User string + type BackupInfo struct + CreatedTime time.Time + Name string + Path string + Size int64 + type BackupStatistics struct + ExpiredBackups int + ExpiredSize int64 + NewestBackup time.Time + OldestBackup time.Time + RetentionDays int + TotalBackups int + TotalSize int64 + ValidBackups int + ValidSize int64 + func (bs *BackupStatistics) String() string + type ColumnInfo struct + CharMaxLength int + ColumnDefault string + ColumnName string + DataType string + IsNullable string + type FieldService struct + func NewFieldService() *FieldService + func (fs *FieldService) AddField(tableName, fieldName, fieldType string, length int, ...) error + func (fs *FieldService) CheckFieldExists(tableName, fieldName string) bool + func (fs *FieldService) CheckTableExists(tableName string) bool + func (fs *FieldService) DeleteField(tableName, fieldName string) error + func (fs *FieldService) GetSingleFieldInfo(tableName, fieldName string) (*models.FieldInfo, error) + func (fs *FieldService) GetTableList() ([]string, error) + func (fs *FieldService) GetTableStructure(tableName string) (*models.TableStructure, error) + func (fs *FieldService) ModifyField(tableName, oldFieldName, newFieldName, fieldType string, length int, ...) error + type Res struct + ColumnName string + type RestoreConfig struct + BackupPath string + Database string + DropExisting bool + Host string + Password string + Port string + RestoreData bool + User string + Verbose bool + type RestoreResult struct + DataRestored int + Duration time.Duration + Errors []string + FunctionsCreated int + IndexesCreated int + Success bool + TablesCreated int + ViewsCreated int + type Result struct + Area float64 + AttributeName string + Dlmc string + func GeoIntersect(jsonData geojson.FeatureCollection, tablename string, att string) []Result + func GeoIntersectForBG(jsonData geojson.FeatureCollection, tablename string, att string) []Result + func GroupAndSum(data []Result) []Result + type SQLBackupManager struct + func NewSQLBackupManager() (*SQLBackupManager, error) + func (sbm *SQLBackupManager) GetBackupStatistics() (*BackupStatistics, error) + func (sbm *SQLBackupManager) PerformSQLBackup() error + type SQLRestoreManager struct + func NewSQLRestoreManager(backupPath string) (*SQLRestoreManager, error) + func (srm *SQLRestoreManager) PerformRestore() (*RestoreResult, error) + func (srm *SQLRestoreManager) SetRestoreOptions(dropExisting, restoreData, verbose bool) + type TableInfo struct + RowCount int64 + SchemaName string + TableName string + TableType string