本文整理匯總了Golang中CitySourcedAPI/logs.LogString類的典型用法代碼示例。如果您正苦於以下問題:Golang LogString類的具體用法?Golang LogString怎麽用?Golang LogString使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了LogString類的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: String
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)
}
示例2: String
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)
}
示例3: String
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)
}
示例4: String
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)
}
示例5: String
// 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)
}
示例6: String
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)
}
示例7: String
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)
}
示例8: String
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)
}
示例9: String
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)
}