Documentation
¶
Index ¶
- Variables
- func BilanWorker(basePath string) chan Bilan
- func CheckMD5(path string) (bool, error)
- func DownloadFile(url string, user string, password string, path string, size int) error
- func DownloadFolder(url string, user string, password string, path string) error
- func GetCreateTableQuery() string
- func GetQueryString() string
- func GetSchema(key Key) ([4]string, error)
- type Bilan
- type KB
- type Key
- type Schema
- type Values
- type XMLBilan
- type XMLBilans
- type XMLDetail
- type XMLIdentite
- type XMLLiasse
- type XMLPage
Constants ¶
This section is empty.
Variables ¶
var Kb = KB{}/* 373 elements not displayed */
Kb schema cible. Les postes du bilan sont calculés à partir de cette variable. le champ M3 d'une ligne AA d'un bilan de type complet deviendra actif_capital_souscrit_non_appele_net
var Postes = getPostes()
Postes liste des postes extrats de la variable Kb
var PostesDetail = getPostesDetail()
PostesDetail Détail de schéma des postes de la liasse
Functions ¶
func BilanWorker ¶
BilanWorker produit tous les bilans contenus dans une arborescence l'exploration de l'arborescence se fait avec une profondeur arbitraire et traite également les zip imbriqués
func DownloadFile ¶
DownloadFile télécharge un fichier si nécessaire et essaye de vérifier le checksum md5 s'il est fourni
func DownloadFolder ¶
DownloadFolder liste les fichiers présents dans un répertoire du ftp
func GetCreateTableQuery ¶
func GetCreateTableQuery() string
GetCreateTableQuery fournit la requête de création de la table sqlite
Types ¶
type Bilan ¶
type Bilan struct {
Siren string `json:"siren" bson:"siren"`
DateClotureExercice time.Time `json:"dateClotureExercice" bson:"dateClotureExercice"`
CodeGreffe string `json:"codeGreffe" bson:"codeGreffe"`
NumDepot string `json:"numDepot" bson:"numDepot"`
NumGestion string `json:"numGestion" bson:"numGestion"`
CodeActivite string `json:"codeActivite" bson:"codeActivite"`
DateClotureExercicePrecedent time.Time `json:"dateClotureExercicePrecedent" bson:"dateClotureExercicePrecedent"`
DureeExercice string `json:"dureeExercice" bson:"dureeExercice"`
DureeExercicePrecedent string `json:"dureeExercicePrecedent" bson:"dureeExercicePrecedent"`
DateDepot time.Time `json:"dateDepot" bson:"dateDepot"`
CodeMotif string `json:"codeMotif" bson:"codeMotif"`
CodeTypeBilan string `json:"codeTypeBilan" bson:"codeTypeBilan"`
CodeDevise string `json:"codeDevise" bson:"codeDevise"`
CodeOrigineDevise string `json:"codeOrigineDevise" bson:"codeOrigineDevise"`
CodeConfidentialite string `json:"codeConfidentialite" bson:"codeConfidentialite"`
Denomination string `json:"denomination" bson:"denomination"`
Adresse string `json:"adresse" bson:"adresse"`
XMLSource string `json:"XMLSource" bson:"XMLSource"`
NomFichier string `json:"nomFichier" bson:"nomFichier"`
Report []string `json:"RapportConversion"`
InfoTraitement string `json:"InfoTraitement"`
Lignes map[string]*int `json:"lignes" bson:"lignes"`
}
Bilan objet restructurant les données d'un bilan au format XML rncs en format maison. Les lignes sont une map identifiées par les postes fournis dans la variable Kb
func ParseBilan ¶
ParseBilan transforme un fichier en variable de type Bilan
func (Bilan) ToQueryParams ¶
func (bilan Bilan) ToQueryParams() []interface{}
ToQueryParams transforme un objet Bilan en liste de champs à insérer dans une base de données
type KB ¶
KB type qui contient le schema cible **structure**
{ "code_poste": {
"code_bilan": {
"page",
"rubrique",
"intitule_colonne_1",
"intitule_colonne_2",
"intitule_colonne_3",
"intitule_colonne_4",
}
}
}
type Schema ¶
type Schema struct {
Page string `json:"page"`
Code string `json:"code"`
Bilan string `json:"bilan"`
Colonne int `json:"colonne"`
}
Schema décrit les emplacements où peut se trouver un champ
type Values ¶
type Values struct {
M1 *int `json:"valeur_m1"`
M2 *int `json:"valeur_m2"`
M3 *int `json:"valeur_m3"`
M4 *int `json:"valeur_m4"`
}
Values données portées par une ligne Chaque ligne comporte 4 colonnes
type XMLBilan ¶
type XMLBilan struct {
XMLName xml.Name `xml:"bilan"`
Identite XMLIdentite `xml:"identite"`
Detail XMLDetail `xml:"detail"`
}
XMLBilan structure Bilan XML
type XMLIdentite ¶
type XMLIdentite struct {
XMLName xml.Name `xml:"identite"`
Siren string `xml:"siren"`
DateClotureExercice string `xml:"date_cloture_exercice"`
CodeGreffe string `xml:"code_greffe"`
NumDepot string `xml:"num_depot"`
NumGestion string `xml:"num_gestion"`
CodeActivite string `xml:"code_activite"`
DateClotureExercicePrecedent string `xml:"date_cloture_exercice_n-1"`
DureeExercice string `xml:"duree_exercice_n"`
DureeExercicePrecedent string `xml:"duree_exercice_n-1"`
DateDepot string `xml:"date_depot"`
CodeMotif string `xml:"code_motif"`
CodeTypeBilan string `xml:"code_type_bilan"`
CodeDevise string `xml:"code_devise"`
CodeOrigineDevise string `xml:"code_origine_devise"`
CodeConfidentialite string `xml:"code_confidentialite"`
Denomination string `xml:"denomination"`
InfoTraitement string `xml:"info_traitement"`
Adresse string `xml:"adresse"`
}
XMLIdentite structure Identite XML