dpae

package
v0.0.0-...-eac8a36 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AuthXml string
View Source
var DpaeXml string
View Source
var RetryNb = 60
View Source
var RetryTempo = 10 * time.Second
View Source
var RetryTempoFirst = time.Second
View Source
var TimeOut = time.Second * 60
View Source
var UrlAuth = "https://mon.urssaf.fr/authentifier_dpae"
View Source
var UrlConsultation = "https://consultation.dpae-edi.urssaf.fr/lister-retours-flux/2.0/"
View Source
var UrlDepot = "https://depot.dpae-edi.urssaf.fr/deposer-dsn/1.0/"

Functions

This section is empty.

Types

type BilanError

type BilanError struct {
	Bilan string
}

func (BilanError) Error

func (a BilanError) Error() string

type Consultation

type Consultation struct {
	Retours Retours `json:"retours"`
}

type Contract

type Contract struct {
	StartContractDate Date
	StartContractTime Time
	EndContractDate   Date
	NatureCode        string
}

type Date

type Date time.Time

func (Date) Format

func (j Date) Format(s string) string

func (Date) String

func (j Date) String() string

func (*Date) UnmarshalJSON

func (j *Date) UnmarshalJSON(b []byte) error

type Dpae

type Dpae struct {
	TestIndicator int // test:1 prod:120
	Identifiants  Identifiants
	Employer      Employer
	Employee      Employee
	Contract      Contract
	// answer
	Jeton  string
	IdFlux string
	Sended string // xml sended
	// retour
	Certificat  string
	CertifError string // message si certif error
}

func (*Dpae) Auth

func (d *Dpae) Auth(pw string) error

Auth appel pour authentification enregistre le jeton dans d.Jeton passage du mot de passe en param pour éviter le risque qu'il n'apparaisse dans un log

func (*Dpae) Retour

func (d *Dpae) Retour() error

Retour get answers from URSSAF starting at 0 to RETRY_NB

func (*Dpae) Send

func (d *Dpae) Send() error

SendDpae send the DPAE and receive the IdFlux doIt false : test = 1 true : prod = 120 record Sended (the template sended) record IdFlux (to get the retour)

func (*Dpae) String

func (d *Dpae) String() string

type Employee

type Employee struct {
	Surname         string
	ChristianName   string
	Sex             int
	NIR             string
	NIRKey          string
	BirthDate       Date
	BirthTown       string
	BirthDepartment string
}

type Employer

type Employer struct {
	Designation   string
	SIRET         string
	APE           string
	URSSAFCode    string
	Adress        string
	Town          string
	Postal        string
	Phone         string
	HealthService string
}

type Flux

type Flux struct {
	ID     string   `json:"id"`
	Retour []Retour `json:"retour"`
}

type Identifiants

type Identifiants struct {
	SIRET      string
	Nom        string
	Prenom     string
	MotDePasse string
	Service    string
}

type Retour

type Retour struct {
	Publication string `json:"publication"`
	Production  string `json:"production"`
	Nature      string `json:"nature"`
	Statut      string `json:"statut"`
	ID          string `json:"id"`
	URL         string `json:"url"`
}

type Retours

type Retours struct {
	Flux []Flux `json:"flux"`
}

type Time

type Time time.Time

func (Time) Format

func (j Time) Format(s string) string

func (Time) String

func (j Time) String() string

func (*Time) UnmarshalJSON

func (j *Time) UnmarshalJSON(b []byte) error

type URSSAFError

type URSSAFError struct {
	Message string
	Err     error
}

URSSAFError Erreur provenant de l'URSSAF de type accès réseau impossible pour différencier des erreurs de debug

func UErr

func UErr(err error, s string) *URSSAFError

func (URSSAFError) Error

func (a URSSAFError) Error() string

Jump to

Keyboard shortcuts

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