Documentation
¶
Index ¶
- Constants
- type AuthResponse
- type Contact
- type ContactResponse
- type ErrorDetail
- type Individual
- type Lawsuit
- type LawsuitResponse
- type LegalOne
- func (l *LegalOne) Autenticate() error
- func (l *LegalOne) GetContactByCPF(cpf string) (*ContactResponse, error)
- func (l *LegalOne) GetLawsuitParticipationByContactID(lawsuitID int, contactID int) (*LawsuitResponse, error)
- func (l *LegalOne) GetLawsuits() (*LawsuitResponse, error)
- func (l *LegalOne) IndividualDelete(id int) error
- func (l *LegalOne) IndividualRegistrate(data map[string]interface{}) (*Individual, error)
- func (l *LegalOne) ParticipationDelete(lawsuitID int, participationID int) error
- func (l *LegalOne) ParticipationRegistrate(data map[string]interface{}) (*LitigationParticipant, error)
- type LitigationParticipant
- type Parser
- func (p *Parser) AuthResponse(data string) (*AuthResponse, error)
- func (p *Parser) GetContactResponse(data string) (*ContactResponse, error)
- func (p *Parser) GetLawsuitResponse(data string) (*LawsuitResponse, error)
- func (p *Parser) IndividualRegistrateRequest() (*Individual, error)
- func (p *Parser) IndividualRegistrateResponse(data string) (*Individual, error)
- func (p *Parser) ParticipationRegistrateRequest() (*LitigationParticipant, error)
- func (p *Parser) ParticipationRegistrateResponse(data string) (*LitigationParticipant, error)
- func (p *Parser) ResponseError(data string) (string, error)
- type ResponseError
Constants ¶
View Source
const ( POSITION_CREDITOR = 24 // exequente PARTICIPATION_TYPE_CUSTOMER = "Customer" )
View Source
const (
TOKEN_VALIDITY = 10
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthResponse ¶
type AuthResponse struct { RefreshTokenExpiresIn string `json:"refresh_token_expires_in,omitempty"` APIProductList string `json:"api_product_list,omitempty"` APIProductListJSON []string `json:"api_product_list_json,omitempty"` OrganizationName string `json:"organization_name,omitempty"` DeveloperEmail string `json:"developer.email,omitempty"` TokenType string `json:"token_type,omitempty"` IssuedAt string `json:"issued_at,omitempty"` ClientID string `json:"client_id,omitempty"` AccessToken string `json:"access_token,omitempty"` ApplicationName string `json:"application_name,omitempty"` Scope string `json:"scope,omitempty"` ExpiresIn string `json:"expires_in,omitempty"` RefreshCount string `json:"refresh_count,omitempty"` Status string `json:"status,omitempty"` }
type Contact ¶
type Contact struct { Type string `json:"type,omitempty"` ID int `json:"id,omitempty"` Name string `json:"name,omitempty"` CreationDate time.Time `json:"creationDate,omitempty"` IdentificationNumber string `json:"identificationNumber,omitempty"` Reason any `json:"reason,omitempty"` ExternalCode string `json:"externalCode,omitempty"` Notes any `json:"notes,omitempty"` RexMonitoring bool `json:"rexMonitoring,omitempty"` CountryID int `json:"countryId,omitempty"` Queries []query `json:"queries,omitempty"` }
type ContactResponse ¶
type ContactResponse struct {
Value []Contact `json:"value,omitempty"`
}
type ErrorDetail ¶
type Individual ¶
type Individual struct { BirthDate any `json:"birthDate,omitempty"` Gender any `json:"gender,omitempty"` Nacionality any `json:"nacionality,omitempty"` NitPisPasep any `json:"nitPisPasep,omitempty"` PersonStateIdentificationNumber any `json:"personStateIdentificationNumber,omitempty"` VoterID any `json:"voterId,omitempty"` VoterGeoraphicZone any `json:"voterGeoraphicZone,omitempty"` VoterSection any `json:"voterSection,omitempty"` WorkerNumber any `json:"workerNumber,omitempty"` WorkerSeries any `json:"workerSeries,omitempty"` ID int `json:"id,omitempty"` Name string `json:"name,omitempty"` CreationDate string `json:"creationDate,omitempty"` IdentificationNumber string `json:"identificationNumber,omitempty"` Reason any `json:"reason,omitempty"` ExternalCode any `json:"externalCode,omitempty"` Notes any `json:"notes,omitempty"` RexMonitoring bool `json:"rexMonitoring,omitempty"` CountryID int `json:"countryId,omitempty"` }
type Lawsuit ¶
type Lawsuit struct { OriginOfficeID int `json:"originOfficeId,omitempty"` ID int `json:"id,omitempty"` Folder string `json:"folder,omitempty"` Title string `json:"title,omitempty"` Type string `json:"type,omitempty"` IdentifierNumber string `json:"identifierNumber,omitempty"` OldNumber string `json:"oldNumber,omitempty"` OtherNumberTypeID int `json:"otherNumberTypeId,omitempty"` OtherNumber string `json:"otherNumber,omitempty"` StatusID int `json:"statusId,omitempty"` DistributionDate string `json:"distributionDate,omitempty"` Notes string `json:"notes,omitempty"` CreationDate string `json:"creationDate,omitempty"` }
type LawsuitResponse ¶
type LawsuitResponse struct {
Value []Lawsuit `json:"value,omitempty"`
}
type LegalOne ¶
type LegalOne struct {
// contains filtered or unexported fields
}
func NewLegalOne ¶
func (*LegalOne) Autenticate ¶
func (*LegalOne) GetContactByCPF ¶
func (l *LegalOne) GetContactByCPF(cpf string) (*ContactResponse, error)
func (*LegalOne) GetLawsuitParticipationByContactID ¶
func (l *LegalOne) GetLawsuitParticipationByContactID(lawsuitID int, contactID int) (*LawsuitResponse, error)
func (*LegalOne) GetLawsuits ¶
func (l *LegalOne) GetLawsuits() (*LawsuitResponse, error)
func (*LegalOne) IndividualDelete ¶
func (*LegalOne) IndividualRegistrate ¶
func (l *LegalOne) IndividualRegistrate(data map[string]interface{}) (*Individual, error)
func (*LegalOne) ParticipationDelete ¶ added in v0.9.1
func (*LegalOne) ParticipationRegistrate ¶ added in v0.9.1
func (l *LegalOne) ParticipationRegistrate(data map[string]interface{}) (*LitigationParticipant, error)
type LitigationParticipant ¶ added in v0.9.1
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
func (*Parser) AuthResponse ¶
func (p *Parser) AuthResponse(data string) (*AuthResponse, error)
func (*Parser) GetContactResponse ¶
func (p *Parser) GetContactResponse(data string) (*ContactResponse, error)
func (*Parser) GetLawsuitResponse ¶
func (p *Parser) GetLawsuitResponse(data string) (*LawsuitResponse, error)
func (*Parser) IndividualRegistrateRequest ¶
func (p *Parser) IndividualRegistrateRequest() (*Individual, error)
func (*Parser) IndividualRegistrateResponse ¶
func (p *Parser) IndividualRegistrateResponse(data string) (*Individual, error)
func (*Parser) ParticipationRegistrateRequest ¶ added in v0.9.1
func (p *Parser) ParticipationRegistrateRequest() (*LitigationParticipant, error)
func (*Parser) ParticipationRegistrateResponse ¶ added in v0.9.1
func (p *Parser) ParticipationRegistrateResponse(data string) (*LitigationParticipant, error)
type ResponseError ¶
type ResponseError struct { Error struct { Code string `json:"code,omitempty"` Message string `json:"message,omitempty"` Target string `json:"target,omitempty"` Details []ErrorDetail `json:"details,omitempty"` } `json:"error,omitempty"` }
Click to show internal directories.
Click to hide internal directories.