Documentation ¶
Index ¶
Constants ¶
View Source
const ( OriginalLawsuit = "Processo Originário" MarcialCourt = "Tribunal Militar Estadual" Region = "região" Estate = "unidade federativa" JudicialC = "circunscrição judiciária" )
View Source
const ( JusticeSection = "subseção judiciária" LaborUnit = "vara do trabalho" ElectoralUnit = "zona eleitoral" MilitaryUnit = "auditoria militar" CivilUnit = "foro" CourtUnitSingle = "competência originária do Tribunal" CourtUnit = "competência originária da Turma Recursal" )
View Source
const ( MOD = "97" SUB = "98" )
View Source
const MATH = "00"
Variables ¶
This section is empty.
Functions ¶
func ValidateCNJ ¶
ValidateCNJ returns if a given cnj number is valid or not using ValidVD
func WriteCNJ ¶
func WriteCNJ(number AnalysisCNJ) (string, error)
WriteCNJ returns a single string with all organized interpretation of CNJ information
Types ¶
type AnalysisCNJ ¶
type AnalysisCNJ struct { ReceivedCNJ string `json:"received_cnj,omitempty"` ValidCNJ bool `json:"valid_cnj,omitempty"` SegmentName string `json:"segmentName,omitempty"` SegmentShort string `json:"segment_short,omitempty"` SourceUnitType string `json:"source_unit_type,omitempty"` SourceUnitNumber string `json:"source_unit_number,omitempty"` CourtType string `json:"court_type,omitempty"` CourtNumber string `json:"court_number,omitempty"` Detailed DecomposedCNJ `json:"Detailed"` }
AnalysisCNJ returns:
receivedCNJ validCNJ given by ValidateCNJ segmentName and segmentShort given by getSegment sourceUnitType and SourceUnitNumber given by getSourceUnit courtType and courtNumber given by getOriginCourt detailed is a struct on it's on given by DecomposeCNJ
func AnalyzeCNJ ¶
func AnalyzeCNJ(cnj string) (AnalysisCNJ, error)
AnalyzeCNJ returns the complex struct AnalysisCNJ containing all the useful data from this package
type DecomposedCNJ ¶
type DecomposedCNJ struct { LawsuitCNJFormat string `json:"lawsuitCNJFormat,omitempty"` LawsuitNumber string `json:"lawsuit_number,omitempty"` VerifyingDigit string `json:"verifying_digit,omitempty"` ProtocolYear string `json:"protocol_year,omitempty"` Segment string `json:"segment,omitempty"` Court string `json:"court,omitempty"` SourceUnit string `json:"source_unit,omitempty"` ArgNumber string `json:"arg_number,omitempty"` District string `json:"district,omitempty"` UF string `json:"UF,omitempty"` TJ string `json:"TJ,omitempty"` }
DecomposedCNJ returns the CNJ in decomposed manner:
lawsuitCNJFormat [NNNNNNN]-[DD].[AAAA].[J].[CT].[0000] lawsuitNumber: [NNNNNNN] verifyingDigit: [DD] protocolYear: [AAAA] segment: [J] court: [CT] sourceUnit: [0000] argNumber: [NNNNNNNAAAAJCT0000] + "00" district: district where the lawsuit was proposed, frequently a city name uf: the uf of the correspondent district tj: the court shortname [TJ/STJ/TRF..]
func DecomposeCNJ ¶
func DecomposeCNJ(cnj string) (DecomposedCNJ, error)
DecomposeCNJ decompose cnj format number into the specifics:
lawsuitCNJFormat = [NNNNNNN]-[DD].[AAAA].[J].[CT].[0000] LawsuitNumber = [NNNNNNN] VerifyingDigit = [DD] ProtocolYear = [AAAA] Segment = [J] Court = [TR] SourceUnit [OOOO] ArgNumber = [LawsuitNumber + ProtocolYear + Segment + Court + SourceUnit + "00"] DistrictInfo = [Name and UF of the city] it is a reading of J.TR.OOOO combination UF = [UF] TJ = [{COURT}+{UF}]
type OriginCourt ¶
type OriginCourt struct {
// contains filtered or unexported fields
}
OriginCourt returns two information:
originCourtType: região, unidade federativa, circunscrição judiciária in cases were the lawsuit is not initiate at 1st instance (primeiro grau) it returns: processo originário
originCourtNumber:
the given court number
type Segment ¶
Segment returns three basic infos:
number - the segment code name - the full name of the segment short - the segment nickname
type SourceUnit ¶
SourceUnit returns two basic infos:
sourceUnitType: -subseção judiciária -vara do trabalho -zona eleitoral -auditoria militar -foro As an exception it returns competência originária do tribunal / turma recursal sourceUnitNumber: - the given source unit code
Click to show internal directories.
Click to hide internal directories.