366 lines
13 KiB
Go
366 lines
13 KiB
Go
|
|
package main
|
||
|
|
|
||
|
|
import (
|
||
|
|
"os"
|
||
|
|
"time"
|
||
|
|
)
|
||
|
|
|
||
|
|
type XmlBkp struct {
|
||
|
|
Annunci struct {
|
||
|
|
Record []AnnuncioBKP `xml:"record"`
|
||
|
|
} `xml:"annunci"`
|
||
|
|
}
|
||
|
|
|
||
|
|
type AnnuncioBKP struct {
|
||
|
|
Codice *string `xml:"codice"`
|
||
|
|
Proprietario *struct {
|
||
|
|
Cliente *struct {
|
||
|
|
ID *string `xml:"id"`
|
||
|
|
Nome *string `xml:"nome"`
|
||
|
|
} `xml:"cliente"`
|
||
|
|
} `xml:"proprietario"`
|
||
|
|
Nazione *string `xml:"nazione"`
|
||
|
|
Regione *string `xml:"regione"`
|
||
|
|
Provincia *string `xml:"provincia"`
|
||
|
|
Comune *string `xml:"comune"`
|
||
|
|
Cap *string `xml:"cap"`
|
||
|
|
Indirizzo *string `xml:"indirizzo"`
|
||
|
|
Civico *string `xml:"civico"`
|
||
|
|
Lat *string `xml:"lat"`
|
||
|
|
Lon *string `xml:"lon"`
|
||
|
|
Tipo *string `xml:"tipo"`
|
||
|
|
Categorie *struct {
|
||
|
|
Categoria *[]struct {
|
||
|
|
ID string `xml:"id"`
|
||
|
|
Nome string `xml:"nome"`
|
||
|
|
} `xml:"categoria"`
|
||
|
|
} `xml:"categorie"`
|
||
|
|
Prezzo *string `xml:"prezzo"`
|
||
|
|
Piani *string `xml:"piani"`
|
||
|
|
Anno *string `xml:"anno"`
|
||
|
|
Consegna *string `xml:"consegna"`
|
||
|
|
Classe *string `xml:"classe"`
|
||
|
|
Mq *string `xml:"mq"`
|
||
|
|
Piano *string `xml:"piano"`
|
||
|
|
PianoPalazzo *string `xml:"piano_palazzo"`
|
||
|
|
UnitaImmobiliari *string `xml:"unita_immobiliari"`
|
||
|
|
NumeroVani *string `xml:"numero_vani"`
|
||
|
|
NumeroCamere *string `xml:"numero_camere"`
|
||
|
|
NumeroLetti *string `xml:"numero_letti"`
|
||
|
|
NumeroBagni *string `xml:"numero_bagni"`
|
||
|
|
NumeroBalconi *string `xml:"numero_balconi"`
|
||
|
|
NumeroTerrazzi *string `xml:"numero_terrazzi"`
|
||
|
|
NumeroBox *string `xml:"numero_box"`
|
||
|
|
NumeroPostiauto *string `xml:"numero_postiauto"`
|
||
|
|
Schede *struct {
|
||
|
|
Scheda *[]struct {
|
||
|
|
ID string `xml:"id"`
|
||
|
|
Nome string `xml:"nome"`
|
||
|
|
Valore *string `xml:"valore"`
|
||
|
|
} `xml:"scheda"`
|
||
|
|
} `xml:"schede"`
|
||
|
|
Accessori *struct {
|
||
|
|
Accessorio *[]struct {
|
||
|
|
ID string `xml:"id"`
|
||
|
|
Nome *string `xml:"nome"`
|
||
|
|
} `xml:"accessorio"`
|
||
|
|
} `xml:"accessori"`
|
||
|
|
Web *string `xml:"web"`
|
||
|
|
Descrizioni *struct {
|
||
|
|
Descrizione *[]struct {
|
||
|
|
Lingua *string `xml:"lingua"`
|
||
|
|
Titolo *string `xml:"titolo"`
|
||
|
|
Testo *string `xml:"testo"`
|
||
|
|
} `xml:"descrizione"`
|
||
|
|
} `xml:"descrizioni"`
|
||
|
|
Allegati *struct {
|
||
|
|
Foto *[]struct {
|
||
|
|
Nome *string `xml:"nome"`
|
||
|
|
URL *string `xml:"url"`
|
||
|
|
} `xml:"foto"`
|
||
|
|
} `xml:"allegati"`
|
||
|
|
Inserito *string `xml:"inserito"`
|
||
|
|
Stato *string `xml:"stato"`
|
||
|
|
}
|
||
|
|
|
||
|
|
type AnnunciXML struct {
|
||
|
|
Annuncio []AnnuncioXML `xml:"Annuncio"`
|
||
|
|
}
|
||
|
|
|
||
|
|
type AnnuncioXML struct {
|
||
|
|
Codice *string `xml:"Codice"`
|
||
|
|
Stato *string `xml:"Stato"`
|
||
|
|
Creato *string `xml:"Creato"`
|
||
|
|
Modifica *string `xml:"Modifica"`
|
||
|
|
Regione *string `xml:"Regione"`
|
||
|
|
Provincia *string `xml:"Provincia"`
|
||
|
|
Comune *string `xml:"Comune"`
|
||
|
|
Indirizzo *string `xml:"Indirizzo"`
|
||
|
|
Civico *string `xml:"Civico"`
|
||
|
|
Latitudine *string `xml:"Latitudine"`
|
||
|
|
Longitudine *string `xml:"Longitudine"`
|
||
|
|
IndirizzoSecondario *string `xml:"IndirizzoSecondario"`
|
||
|
|
CivicoSecondario *string `xml:"CivicoSecondario"`
|
||
|
|
LatitudineSecondario *string `xml:"LatitudineSecondario"`
|
||
|
|
LongitudineSecondario *string `xml:"LongitudineSecondario"`
|
||
|
|
Tipologia *string `xml:"Tipologia"`
|
||
|
|
Tipologia2 *string `xml:"Tipologia2"`
|
||
|
|
Categoria *[]string `xml:"Categoria"`
|
||
|
|
HomePage *string `xml:"HomePage"`
|
||
|
|
Prezzo *string `xml:"Prezzo"`
|
||
|
|
Anno *string `xml:"Anno"`
|
||
|
|
Mq *string `xml:"Mq"`
|
||
|
|
Vani *string `xml:"Vani"`
|
||
|
|
Camere *string `xml:"Camere"`
|
||
|
|
Bagni *string `xml:"Bagni"`
|
||
|
|
Balconi *string `xml:"Balconi"`
|
||
|
|
Terrazzi *string `xml:"Terrazzi"`
|
||
|
|
Piano *string `xml:"Piano"`
|
||
|
|
PianiCondominio *string `xml:"PianiCondominio"`
|
||
|
|
UnitaCondominio *string `xml:"UnitaCondominio"`
|
||
|
|
Box *string `xml:"Box"`
|
||
|
|
PostiAuto *string `xml:"PostiAuto"`
|
||
|
|
Classe *string `xml:"Classe"`
|
||
|
|
Scheda_AccessoDisabili *string `xml:"Scheda_AccessoDisabili"`
|
||
|
|
Scheda_AccoglienzaBimbi *string `xml:"Scheda_AccoglienzaBimbi"`
|
||
|
|
Scheda_AcquaCalda *string `xml:"Scheda_AcquaCalda"`
|
||
|
|
Scheda_AffittoMuriAnno *string `xml:"Scheda_AffittoMuriAnno"`
|
||
|
|
Scheda_Appartamenti *string `xml:"Scheda_Appartamenti"`
|
||
|
|
Scheda_Arredi *string `xml:"Scheda_Arredi"`
|
||
|
|
Scheda_Balconi *string `xml:"Scheda_Balconi"`
|
||
|
|
Scheda_CambioBiancheria *string `xml:"Scheda_CambioBiancheria"`
|
||
|
|
Scheda_CanoniAnticipati *string `xml:"Scheda_CanoniAnticipati"`
|
||
|
|
Scheda_CantinaSolaio *string `xml:"Scheda_CantinaSolaio"`
|
||
|
|
Scheda_Categoria *string `xml:"Scheda_Categoria"`
|
||
|
|
Scheda_Cauzione *string `xml:"Scheda_Cauzione"`
|
||
|
|
Scheda_Destinazione *string `xml:"Scheda_Destinazione"`
|
||
|
|
Scheda_ElettricitaGas *string `xml:"Scheda_ElettricitaGas"`
|
||
|
|
Scheda_FonteEnergetica *string `xml:"Scheda_FonteEnergetica"`
|
||
|
|
Scheda_Giardino *string `xml:"Scheda_Giardino"`
|
||
|
|
Scheda_Grado *string `xml:"Scheda_Grado"`
|
||
|
|
Scheda_IncassoAnnuo *string `xml:"Scheda_IncassoAnnuo"`
|
||
|
|
Scheda_IndiceEdificabilita *string `xml:"Scheda_IndiceEdificabilita"`
|
||
|
|
Scheda_Infissi *string `xml:"Scheda_Infissi"`
|
||
|
|
Scheda_Internet *string `xml:"Scheda_Internet"`
|
||
|
|
Scheda_LatiLiberi *string `xml:"Scheda_LatiLiberi"`
|
||
|
|
Scheda_Magazzino *string `xml:"Scheda_Magazzino"`
|
||
|
|
Scheda_NumeroCamere *string `xml:"Scheda_NumeroCamere"`
|
||
|
|
Scheda_NumeroDipendenti *string `xml:"Scheda_NumeroDipendenti"`
|
||
|
|
Scheda_NumeroVetrine *string `xml:"Scheda_NumeroVetrine"`
|
||
|
|
Scheda_OneriUrbanizzazione *string `xml:"Scheda_OneriUrbanizzazione"`
|
||
|
|
Scheda_OrariApertura *string `xml:"Scheda_OrariApertura"`
|
||
|
|
Scheda_Orientamento *string `xml:"Scheda_Orientamento"`
|
||
|
|
Scheda_Panorama *string `xml:"Scheda_Panorama"`
|
||
|
|
Scheda_PavimentoBagno *string `xml:"Scheda_PavimentoBagno"`
|
||
|
|
Scheda_PavimentoCucina *string `xml:"Scheda_PavimentoCucina"`
|
||
|
|
Scheda_PavimentoGiorno *string `xml:"Scheda_PavimentoGiorno"`
|
||
|
|
Scheda_PavimentoNotte *string `xml:"Scheda_PavimentoNotte"`
|
||
|
|
Scheda_Pavimento *string `xml:"Scheda_Pavimento"`
|
||
|
|
Scheda_Persiana *string `xml:"Scheda_Persiana"`
|
||
|
|
Scheda_Piano *string `xml:"Scheda_Piano"`
|
||
|
|
Scheda_Posizione *string `xml:"Scheda_Posizione"`
|
||
|
|
Scheda_PossibilitàAcquistoMuri *string `xml:"Scheda_PossibilitàAcquistoMuri"`
|
||
|
|
Scheda_PostiSedere *string `xml:"Scheda_PostiSedere"`
|
||
|
|
Scheda_Pulizie *string `xml:"Scheda_Pulizie"`
|
||
|
|
Scheda_Raffrescamento *string `xml:"Scheda_Raffrescamento"`
|
||
|
|
Scheda_Riscaldamento *string `xml:"Scheda_Riscaldamento"`
|
||
|
|
Scheda_ScadenzaContratto *string `xml:"Scheda_ScadenzaContratto"`
|
||
|
|
Scheda_Serramenti *string `xml:"Scheda_Serramenti"`
|
||
|
|
Scheda_SpCondominialiAnno *string `xml:"Scheda_SpCondominialiAnno"`
|
||
|
|
Scheda_SpazioParcheggio *string `xml:"Scheda_SpazioParcheggio"`
|
||
|
|
Scheda_StatoImmobile *string `xml:"Scheda_StatoImmobile"`
|
||
|
|
Scheda_Taverna *string `xml:"Scheda_Taverna"`
|
||
|
|
Scheda_Terrazzi *string `xml:"Scheda_Terrazzi"`
|
||
|
|
Scheda_TipoContratto *string `xml:"Scheda_TipoContratto"`
|
||
|
|
Scheda_TipoCucina *string `xml:"Scheda_TipoCucina"`
|
||
|
|
Scheda_TipoGestione *string `xml:"Scheda_TipoGestione"`
|
||
|
|
Scheda_TipoImpianto *string `xml:"Scheda_TipoImpianto"`
|
||
|
|
Scheda_TipoRegistr *string `xml:"Scheda_TipoRegistr"`
|
||
|
|
Scheda_TipoRiscaldamento *string `xml:"Scheda_TipoRiscaldamento"`
|
||
|
|
Scheda_TipoSaracinesca *string `xml:"Scheda_TipoSaracinesca"`
|
||
|
|
Scheda_TipoSoggiorno *string `xml:"Scheda_TipoSoggiorno"`
|
||
|
|
Scheda_TotalePiani *string `xml:"Scheda_TotalePiani"`
|
||
|
|
Scheda_Tv *string `xml:"Scheda_Tv"`
|
||
|
|
Accessori *[]string `xml:"Accessori"`
|
||
|
|
Titolo *string `xml:"Titolo"`
|
||
|
|
TitoloEn *string `xml:"Titolo_En"`
|
||
|
|
Descrizione *string `xml:"Descrizione"`
|
||
|
|
DescrizioneEn *string `xml:"Descrizione_En"`
|
||
|
|
Foto *[]string `xml:"Foto"`
|
||
|
|
Consegna *string `xml:"Consegna"`
|
||
|
|
Clienti *struct {
|
||
|
|
Cliente *struct {
|
||
|
|
Id *string `xml:"Id"`
|
||
|
|
Cognome *string `xml:"Cognome"`
|
||
|
|
Nome *string `xml:"Nome"`
|
||
|
|
Tel1 *string `xml:"Tel1"`
|
||
|
|
Tel2 *string `xml:"Tel2"`
|
||
|
|
Tel3 *string `xml:"Tel3"`
|
||
|
|
Email1 *string `xml:"Email1"`
|
||
|
|
} `xml:"Cliente"`
|
||
|
|
} `xml:"Clienti"`
|
||
|
|
Cap *string `xml:"Cap"`
|
||
|
|
Video *[]string `xml:"Video"`
|
||
|
|
AMMedias *[]struct {
|
||
|
|
AMVideo *struct {
|
||
|
|
Url *string `xml:"Url"`
|
||
|
|
} `xml:"AMVideo"`
|
||
|
|
} `xml:"AMMedias"`
|
||
|
|
}
|
||
|
|
|
||
|
|
type AnnunciParsed struct {
|
||
|
|
Annuncio []AnnuncioParsed
|
||
|
|
}
|
||
|
|
type AnnuncioParsed struct {
|
||
|
|
Accessori *[]string
|
||
|
|
Anno *string
|
||
|
|
Numero_bagni *string
|
||
|
|
Numero_balconi *string
|
||
|
|
Numero_box *string
|
||
|
|
Numero_camere *string
|
||
|
|
Cap *string
|
||
|
|
Categorie *[]string
|
||
|
|
Civico *string
|
||
|
|
Civico_secondario *string
|
||
|
|
Classe *string
|
||
|
|
Codice string
|
||
|
|
Comune *string
|
||
|
|
Consegna *int
|
||
|
|
Creato_il *time.Time
|
||
|
|
Desc_it *string
|
||
|
|
Desc_en *string
|
||
|
|
Email *string
|
||
|
|
Homepage *bool
|
||
|
|
Indirizzo *string
|
||
|
|
Indirizzo_secondario *string
|
||
|
|
Lat *string
|
||
|
|
Lat_secondario *string
|
||
|
|
Lon *string
|
||
|
|
Lon_secondario *string
|
||
|
|
Modificato_il *time.Time
|
||
|
|
Mq *string
|
||
|
|
Piano_palazzo *string
|
||
|
|
Piano *string
|
||
|
|
Numero_postiauto *string
|
||
|
|
Prezzo int
|
||
|
|
Provincia *string
|
||
|
|
Regione *string
|
||
|
|
Caratteristiche *map[string]interface{}
|
||
|
|
Locatore *string
|
||
|
|
Numero *string
|
||
|
|
Idlocatore *string
|
||
|
|
Stato *string
|
||
|
|
Numero_terrazzi *string
|
||
|
|
Tipo *string
|
||
|
|
Titolo_it *string
|
||
|
|
Titolo_en *string
|
||
|
|
Unita_condominio *string
|
||
|
|
Numero_vani *string
|
||
|
|
Url_foto *[]string
|
||
|
|
Url_video *[]string
|
||
|
|
Web *bool
|
||
|
|
}
|
||
|
|
|
||
|
|
type AnnunciDB struct {
|
||
|
|
Id int
|
||
|
|
Codice string
|
||
|
|
Locatore *string
|
||
|
|
Numero *string
|
||
|
|
Idlocatore *string
|
||
|
|
Indirizzo *string
|
||
|
|
Civico *string
|
||
|
|
Comune *string
|
||
|
|
Cap *string
|
||
|
|
Provincia *string
|
||
|
|
Regione *string
|
||
|
|
Lat *string
|
||
|
|
Lon *string
|
||
|
|
Indirizzo_secondario *string
|
||
|
|
Civico_secondario *string
|
||
|
|
Lat_secondario *string
|
||
|
|
Lon_secondario *string
|
||
|
|
Tipo *string
|
||
|
|
Categorie *[]string
|
||
|
|
Prezzo int
|
||
|
|
Anno *string
|
||
|
|
Consegna *string
|
||
|
|
Classe *string
|
||
|
|
Mq *string
|
||
|
|
Piano *string
|
||
|
|
Piano_palazzo *int
|
||
|
|
Unita_condominio *int
|
||
|
|
Numero_vani *int
|
||
|
|
Numero_camere *int
|
||
|
|
Numero_bagni *int
|
||
|
|
Numero_balconi *int
|
||
|
|
Numero_terrazzi *int
|
||
|
|
Numero_box *int
|
||
|
|
Numero_postiauto *int
|
||
|
|
Accessori *[]string
|
||
|
|
Titolo_it *string
|
||
|
|
Desc_it *string
|
||
|
|
Titolo_en *string
|
||
|
|
Desc_en *string
|
||
|
|
Stato *string
|
||
|
|
Web *bool
|
||
|
|
Caratteristiche *map[string]interface{}
|
||
|
|
Url_immagini *[]string
|
||
|
|
Homepage *bool
|
||
|
|
Url_video *[]string
|
||
|
|
Email *string
|
||
|
|
Creato_il *time.Time
|
||
|
|
Modificato_il *time.Time
|
||
|
|
}
|
||
|
|
|
||
|
|
type FilebrowserData struct {
|
||
|
|
Data []File
|
||
|
|
Folder *string
|
||
|
|
}
|
||
|
|
|
||
|
|
type File struct {
|
||
|
|
Name string
|
||
|
|
Size int64
|
||
|
|
Mode os.FileMode
|
||
|
|
ModTime string
|
||
|
|
IsDir bool
|
||
|
|
}
|
||
|
|
type DefaultCaratteristiche struct {
|
||
|
|
Scheda []struct {
|
||
|
|
Id string `xml:"id"`
|
||
|
|
Tagxml string `xml:"tagxml"`
|
||
|
|
} `xml:"scheda"`
|
||
|
|
}
|
||
|
|
type Caratteristica struct {
|
||
|
|
Id string
|
||
|
|
Tagxml string
|
||
|
|
}
|
||
|
|
type ListaCaratteristiche struct {
|
||
|
|
Caratteristiche []Caratteristica
|
||
|
|
}
|
||
|
|
|
||
|
|
type DefaultCategories struct {
|
||
|
|
Cat []struct {
|
||
|
|
ID string `xml:"id"`
|
||
|
|
Nome string `xml:"nome"`
|
||
|
|
} `xml:"cat"`
|
||
|
|
}
|
||
|
|
|
||
|
|
type Categoria struct {
|
||
|
|
Id string
|
||
|
|
Nome string
|
||
|
|
}
|
||
|
|
|
||
|
|
type Storageindex struct {
|
||
|
|
Id string
|
||
|
|
Created_at time.Time
|
||
|
|
Filename string
|
||
|
|
Ext string
|
||
|
|
From_admin bool
|
||
|
|
Expires_at *time.Time
|
||
|
|
}
|
||
|
|
|
||
|
|
type MiogestImagesRef_Table struct {
|
||
|
|
Codice string
|
||
|
|
Foto *[]string
|
||
|
|
}
|