func (st CreateReportVote) String() string {
	ls := new(logs.LogString)
	ls.AddS("CreateReportVote\n")
	ls.AddS(st.Request.String())
	ls.AddF("ID %s/%d\n", st.ReportID, st.reportID)
	return ls.Box(90)
}
func (r Request) String() string {
	ls := new(logs.LogString)
	ls.AddS("Request_Type\n")
	ls.AddF("Start: %v\n", r.start)
	ls.AddF("Request - type: %s  ver: %s\n", r.ApiRequestType, r.ApiRequestVersion)
	return ls.BoxC(60)
}
func (c Comment) String() string {
	ls := new(logs.LogString)
	ls.AddS("Comment\n")
	ls.AddF("ID: %d   ReportID: %d  Created: %v\n", c.ID, c.ReportID, c.DateCreated)
	ls.AddF("%s\n", c.Comment)
	return ls.BoxC(70)
}
func (s CreateThreeOneOne) String() string {
	ls := new(logs.LogString)
	ls.AddS("CreateThreeOneOne_Type\n")
	ls.AddS(s.Request.String())
	ls.AddF("DateCreated \"%v\"\n", s.DateCreated)
	ls.AddF("Device - type %s  model: %s  Id: %s\n", s.DeviceType, s.DeviceModel, s.DeviceID)
	ls.AddF("Request - type: %q  id: %q\n", s.RequestType, s.RequestTypeID)
	ls.AddF("Location - lat: %v  lon: %v  directionality: %q\n", s.Latitude, s.Longitude, s.Directionality)
	ls.AddF("Description: %q\n", s.Description)
	ls.AddF("Author(anon: %t) %s %s  Email: %s  Tel: %s\n", s.AuthorIsAnonymous, s.AuthorNameFirst, s.AuthorNameLast, s.AuthorEmail, s.AuthorTelephone)
	for _, v := range s.KeyValuePairs {
		ls.AddF("   %s: %s\n", v.Key, v.Value)
	}
	return ls.Box(90)
}
// Displays the contents of the Spec_Type custom type.
func (s BaseReport) String() string {
	ls := new(logs.LogString)
	ls.AddS("Base Report\n")
	ls.AddF("DateCreated \"%v\"\n", s.DateCreated)
	ls.AddF("Device - type %s  model: %s  ID: %s\n", s.DeviceType, s.DeviceModel, s.DeviceID)
	ls.AddF("Request - type: %q  id: %q\n", s.RequestType, s.RequestTypeID)
	ls.AddF("Location - lat: %v  lon: %v  directionality: %q\n", s.LatitudeV, s.LongitudeV, s.Directionality)
	ls.AddF("          %s, %s   %s\n", s.City, s.State, s.ZipCode)
	ls.AddF("Votes: %d\n", s.VotesV)
	ls.AddF("Description: %q\n", s.Description)
	ls.AddF("Images - std: %s\n", s.ImageUrl)
	ls.AddF("          XS: %s\n", s.ImageUrlXs)
	ls.AddF("          SM: %s\n", s.ImageUrlSm)
	ls.AddF("          MD: %s\n", s.ImageUrlMd)
	ls.AddF("          LG: %s\n", s.ImageUrlLg)
	ls.AddF("          XL: %s\n", s.ImageUrlXl)
	ls.AddF("Author(anon: %t) %s %s  Email: %s  Tel: %s\n", s.AuthorIsAnonymousV, s.AuthorNameFirst, s.AuthorNameLast, s.AuthorEmail, s.AuthorTelephone)
	ls.AddF("SLA: %s\n", s.TicketSLA)
	return ls.Box(80)
}
// Displays the contents of the Spec_Type custom type.
func (r Report) String() string {
	ls := new(logs.LogString)
	ls.AddS("Report\n")
	ls.AddF("ID: %v\n", r.ID)
	ls.AddS(r.BaseReport.String())
	for _, c := range r.Comments {
		ls.AddF("%5d  %20s %s\n", c.ID, c.DateCreated, c.Comment)
	}
	return ls.Box(90)
}
Beispiel #7
0
func (s CSSearchReport) String() string {
	ls := new(logs.LogString)
	ls.AddF("Report %d\n", s.ID)
	ls.AddF("DateCreated \"%v\"\n", s.DateCreated)
	ls.AddF("Device - type %s  model: %s  ID: %s\n", s.DeviceType, s.DeviceModel, s.DeviceID)
	ls.AddF("Request - type: %q  id: %q\n", s.RequestType, s.RequestTypeID)
	ls.AddF("Location - lat: %v  lon: %v  directionality: %q\n", s.Latitude, s.Longitude, s.Directionality)
	ls.AddF("          %s, %s   %s\n", s.City, s.State, s.ZipCode)
	ls.AddF("Votes: %d\n", s.Votes)
	ls.AddF("Description: %q\n", s.Description)
	ls.AddF("Images - std: %s\n", s.ImageURL)
	if len(s.ImageURLXs) > 0 {
		ls.AddF("          XS: %s\n", s.ImageURLXs)
	}
	if len(s.ImageURLSm) > 0 {
		ls.AddF("          SM: %s\n", s.ImageURLSm)
	}
	if len(s.ImageURLMd) > 0 {
		ls.AddF("          XS: %s\n", s.ImageURLMd)
	}
	if len(s.ImageURLLg) > 0 {
		ls.AddF("          XS: %s\n", s.ImageURLLg)
	}
	if len(s.ImageURLXl) > 0 {
		ls.AddF("          XS: %s\n", s.ImageURLXl)
	}
	ls.AddF("Author(anon: %v) %s %s  Email: %s  Tel: %s\n", s.AuthorIsAnonymous, s.AuthorNameFirst, s.AuthorNameLast, s.AuthorEmail, s.AuthorTelephone)
	ls.AddF("SLA: %s\n", s.TicketSLA)
	return ls.Box(80)
}
func (c Comments) String() string {
	ls := new(logs.LogString)
	ls.AddS("Comments\n")
	ls.AddF("Loaded: %t   lastID: %d\n", c.Loaded, c.lastID)
	for _, x := range c.All {
		ls.AddS(x.String())
	}
	ls.AddS("ID Index  (All values should match)\n")
	for k, v := range c.indID {
		ls.AddF("   %-6d  %-6d\n", k, v.ID)
	}

	ls.AddS("ReportID Index\n")
	for k, v := range c.indReportID {
		ls.AddF("   %d  [", k)
		for _, x := range v {
			ls.AddF("%d ", x.ID)
		}
		ls.AddS("]\n")
	}

	return ls.BoxC(80)
}
func (st CreateReportComment) String() string {
	ls := new(logs.LogString)
	ls.AddS("CreateReportComment\n")
	ls.AddS(st.Request.String())
	ls.AddF("ID %s/%d\n", st.ReportID, st.reportID)
	ls.AddF("Comment: %v\n", st.Comment)
	return ls.Box(90)
}
func (st UpdateThreeOneOne) String() string {
	ls := new(logs.LogString)
	ls.AddS("UpdateThreeOneOne\n")
	ls.AddS(st.Request.String())
	ls.AddF("ID %s/%d\n", st.ReportID, st.reportID)
	ls.AddF("SLA %q\n", st.TicketSLA)
	return ls.Box(90)
}
func (st GetReportsByAddress) String() string {
	ls := new(logs.LogString)
	ls.AddS("GetReportsByAddress\n")
	ls.AddS(st.Request.String())
	ls.AddF("Address \"%v\"\n", st.Address)
	ls.AddF("Radius %s/%v   MaxResults: %s/%v\n", st.Radius, st.radius, st.MaxResults, st.maxResults)
	ls.AddF("IncludeComments: %s/%v\n", st.IncludeComments, st.includeComments)
	ls.AddF("IncludeDetails: %v/%t\n", st.IncludeDetails, st.includeDetails)
	ls.AddF("Date Range: %v  to: %v \n", st.DateRangeStart, st.DateRangeEnd)
	return ls.Box(90)
}
func (st GetReport) String() string {
	ls := new(logs.LogString)
	ls.AddS("GetReport\n")
	ls.AddS(st.Request.String())
	ls.AddF("ReportID: %q\n", st.ReportID)
	ls.AddF("IncludeComments: %s/%v\n", st.IncludeComments, st.includeComments)
	ls.AddF("IncludeDetails: %v/%t\n", st.IncludeDetails, st.includeDetails)
	ls.AddF("IncludeVotes: %v/%t\n", st.IncludeVotes, st.includeVotes)
	ls.AddF("Date Range: %v  to: %v \n", st.DateRangeStart, st.DateRangeEnd)
	return ls.Box(90)
}
func (st GetReportsByZipCode) String() string {
	ls := new(logs.LogString)
	ls.AddS("GetReportsByZipCode\n")
	ls.AddS(st.Request.String())
	ls.AddF("ZipCode: %q\n", st.ZipCode)
	ls.AddF("MaxResults: %s/%v\n", st.MaxResults, st.maxResults)
	ls.AddF("IncludeComments: %s/%v\n", st.IncludeComments, st.includeComments)
	ls.AddF("IncludeDetails: %v/%t\n", st.IncludeDetails, st.includeDetails)
	ls.AddF("Date Range: %v  to: %v \n", st.DateRangeStart, st.DateRangeEnd)
	return ls.Box(90)
}