Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Charge ¶
type Charge struct { Description string // description of the charge. Count int // number of counts for the charge. }
Charge represents a charge for a case.
func (Charge) HasMultiple ¶
HasMultiple checks if there are multiple counts for the charge.
type CsvOutput ¶
type CsvOutput struct {
DocketMapping // docket data.
}
CsvOutput will format the docket data as CSV in the format of: time,[case],[charge],[count].
type Docket ¶
type Docket struct { Data DocketMapping // format of... { [time]: [{ [name]: [{ Description: [charge], Count: [count] }] } }. Office string // which office for the docket. Date string // which date for the docket. Client *http.Client // HTTP client handler. // contains filtered or unexported fields }
Docket represents the data parsed from the Court Docket.
func (*Docket) AddCase ¶
AddCase parses the case title and append it to the current time. Should a case contain multiple people via "; ", then each will be appended to the current time.
func (*Docket) AddCharge ¶
AddCharge will either append a charge to the case or if the charge already exists for the case, it will increase it's count.
func (*Docket) Fetch ¶
Fetch runs an HTTP call to the court docket page for the current date and supplied office. Returning an HTTP response.
type DocketMapping ¶
Alias type for the docket data container.
type JsonOutput ¶
type JsonOutput struct { DocketMapping // docket data. Pretty bool // print pretty Json or not. }
JsonOutput will format the docket data as Json.
func NewJsonOutput ¶
func NewJsonOutput(dm DocketMapping) JsonOutput
NewJsonOutut returns a JsonOutput with non-pretty formatting.
func NewPrettyJsonOutput ¶
func NewPrettyJsonOutput(dm DocketMapping) JsonOutput
NewPrettyJsonOutut returns a JsonOutputter with pretty formatting.
type TextOutput ¶
type TextOutput struct {
DocketMapping // docket data.
}
TextOutput will format the docket data as plain text.
func NewTextOutput ¶
func NewTextOutput(dm DocketMapping) TextOutput
NewTextOutput returns a TextOutputter.