Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CSVReader ¶
type CSVReader struct {
// contains filtered or unexported fields
}
CSVReader read
func NewCSVReader ¶
NewCSVReader returns a new Reader that reads from r.
type Contact ¶
type Contact string
Contact describes a contact
func (*Contact) UnmarshalZTIC ¶
UnmarshalZTIC implements the Unmarshaler interface
type Decoder ¶
type Decoder struct{}
Decoder decodes `ServiceTicets` from a io.Reader
type InvalidUnmarshalError ¶
An InvalidUnmarshalError describes an invalid argument passed to Unmarshal. (The argument to Unmarshal must be a non-nil pointer.)
func (*InvalidUnmarshalError) Error ¶
func (e *InvalidUnmarshalError) Error() string
type Predicate ¶
type Predicate func(ticket *ServiceTicket) bool
Predicate describes a predicate function on a `ServiceTicket`
type ServiceTicket ¶
type ServiceTicket struct { ID int `ztic:"Service Order ID"` Description string `ztic:"Service Order Description"` Owner Contact `ztic:"Employee Responsible Name"` PostingDate time.Time `ztic:"Posting Date,02.01.2006"` FirstResponseTime time.Time `ztic:"First Response Date,02.01.2006 15:04:05 "` FollowUpDate time.Time `ztic:"Follow-up Date,02.01.2006"` ChangedOnTime time.Time `ztic:"Changed On,02.01.2006 15:04:05"` UserStatus string `ztic:"User Status"` }
ServiceTicket describes a service ticket
func (*ServiceTicket) InLocation ¶
func (s *ServiceTicket) InLocation(loc *time.Location) *ServiceTicket
InLocation returns a copy of `s` where all dates have been set to given `loc`.
func (*ServiceTicket) String ¶
func (s *ServiceTicket) String() string
type ServiceTickets ¶
type ServiceTickets []*ServiceTicket
ServiceTickets represents a list of `ServiceTicket`
func (ServiceTickets) Filter ¶
func (l ServiceTickets) Filter(pred Predicate) ServiceTickets
Filter returns `ServiceTickets` which match given `Predicate`
func (ServiceTickets) InLocation ¶
func (l ServiceTickets) InLocation(loc *time.Location) ServiceTickets
InLocation returns a copy of `l` where all dates have been set to given `loc`.
type Unmarshaler ¶
Unmarshaler is the interface implemented by types that can unmarshal a string description of themselves. The input can be assumed to be a valid string.