Documentation
¶
Index ¶
- func AddRoutes(r chi.Router)
- type Bounds
- type H3Cell
- type NoteAudioBreadcrumbPayload
- type NoteAudioPayload
- type NoteImagePayload
- type ResponseClientIos
- type ResponseErr
- type ResponseFieldseeker
- type ResponseMosquitoInspection
- type ResponseMosquitoSource
- type ResponseMosquitoTreatment
- type ResponseNote
- type ResponseServiceRequest
- type ResponseTrapData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type NoteAudioPayload ¶
type NoteAudioPayload struct {
UUID string `json:"uuid"`
Breadcrumbs []NoteAudioBreadcrumbPayload `json:"breadcrumbs"`
Created time.Time `json:"created"`
CreatorID int `json:"creator_id"`
Deleted *time.Time `json:"deleted"`
DeletorID *int32 `json:"deletor_id"`
Duration float32 `json:"duration"`
Transcription *string `json:"transcription"`
TranscriptionUserEdited bool `json:"transcriptionUserEdited"`
Version int32 `json:"version"`
}
type NoteImagePayload ¶
type ResponseClientIos ¶
type ResponseClientIos struct {
Fieldseeker ResponseFieldseeker `json:"fieldseeker"`
Since time.Time `json:"since"`
}
ResponseErr renderer type for handling all sorts of errors.
func (ResponseClientIos) Render ¶
func (i ResponseClientIos) Render(w http.ResponseWriter, r *http.Request) error
type ResponseErr ¶
type ResponseErr struct {
Error error `json:"-"` // low-level runtime error
HTTPStatusCode int `json:"-"` // http response status code
StatusText string `json:"status"` // user-level status message
AppCode int64 `json:"code,omitempty"` // application-specific error code
ErrorText string `json:"error,omitempty"` // application-level error message, for debugging
}
In the best case scenario, the excellent github.com/pkg/errors package helps reveal information on the error, setting it on Err, and in the Render() method, using it to set the application-specific error code in AppCode.
func (*ResponseErr) Render ¶
func (e *ResponseErr) Render(w http.ResponseWriter, r *http.Request) error
type ResponseFieldseeker ¶
type ResponseFieldseeker struct {
MosquitoSources []ResponseMosquitoSource `json:"sources"`
ServiceRequests []ResponseServiceRequest `json:"requests"`
TrapData []ResponseTrapData `json:"traps"`
}
type ResponseMosquitoInspection ¶
type ResponseMosquitoInspection struct {
ActionTaken string `json:"action_taken"`
Comments string `json:"comments"`
Condition string `json:"condition"`
Created string `json:"created"`
EndDateTime string `json:"end_date_time"`
FieldTechnician string `json:"field_technician"`
ID string `json:"id"`
LocationName string `json:"location_name"`
SiteCondition string `json:"site_condition"`
}
func NewResponseMosquitoInspection ¶
func NewResponseMosquitoInspection(i *models.FieldseekerMosquitoinspection) ResponseMosquitoInspection
func NewResponseMosquitoInspections ¶
func NewResponseMosquitoInspections(inspections models.FieldseekerMosquitoinspectionSlice) []ResponseMosquitoInspection
func (ResponseMosquitoInspection) Render ¶
func (rtd ResponseMosquitoInspection) Render(w http.ResponseWriter, r *http.Request) error
type ResponseMosquitoSource ¶
type ResponseMosquitoSource struct {
Access string `json:"access"`
Active *bool `json:"active"`
Comments string `json:"comments"`
Created string `json:"created"`
Description string `json:"description"`
H3Cell int64 `json:"h3cell"`
ID string `json:"id"`
LastInspectionDate string `json:"last_inspection_date"`
Habitat string `json:"habitat"`
Inspections []ResponseMosquitoInspection `json:"inspections"`
Name string `json:"name"`
NextActionDateScheduled string `json:"next_action_date_scheduled"`
Treatments []ResponseMosquitoTreatment `json:"treatments"`
UseType string `json:"use_type"`
WaterOrigin string `json:"water_origin"`
Zone string `json:"zone"`
}
func NewResponseMosquitoSource ¶
func NewResponseMosquitoSource(ms platform.MosquitoSource) ResponseMosquitoSource
func NewResponseMosquitoSources ¶
func NewResponseMosquitoSources(sources []platform.MosquitoSource) []ResponseMosquitoSource
func (ResponseMosquitoSource) Render ¶
func (rtd ResponseMosquitoSource) Render(w http.ResponseWriter, r *http.Request) error
type ResponseMosquitoTreatment ¶
type ResponseMosquitoTreatment struct {
Comments string `json:"comments"`
Created string `json:"created"`
EndDateTime string `json:"end_date_time"`
FieldTechnician string `json:"field_technician"`
Habitat string `json:"habitat"`
ID string `json:"id"`
Product string `json:"product"`
Quantity float64 `json:"quantity"`
QuantityUnit string `json:"quantity_unit"`
SiteCondition string `json:"site_condition"`
TreatAcres float64 `json:"treat_acres"`
TreatHectares float64 `json:"treat_hectares"`
}
func NewResponseMosquitoTreatment ¶
func NewResponseMosquitoTreatment(i *models.FieldseekerTreatment) ResponseMosquitoTreatment
func NewResponseMosquitoTreatments ¶
func NewResponseMosquitoTreatments(treatments models.FieldseekerTreatmentSlice) []ResponseMosquitoTreatment
func (ResponseMosquitoTreatment) Render ¶
func (rtd ResponseMosquitoTreatment) Render(w http.ResponseWriter, r *http.Request) error
type ResponseNote ¶
type ResponseNote struct {
CategoryName string `json:"categoryName"`
Content string `json:"content"`
H3Cell int64 `json:"h3cell"`
ID string `json:"id"`
Timestamp string `json:"timestamp"`
}
func (ResponseNote) Render ¶
func (rtd ResponseNote) Render(w http.ResponseWriter, r *http.Request) error
type ResponseServiceRequest ¶
type ResponseServiceRequest struct {
Address string `json:"address"`
AssignedTechnician string `json:"assigned_technician"`
City string `json:"city"`
Created string `json:"created"`
H3Cell int64 `json:"h3cell"`
HasDog *bool `json:"has_dog"`
HasSpanishSpeaker *bool `json:"has_spanish_speaker"`
ID string `json:"id"`
Priority string `json:"priority"`
RecordedDate string `json:"recorded_date"`
Source string `json:"source"`
Status string `json:"status"`
Target string `json:"target"`
Zip string `json:"zip"`
}
func NewResponseServiceRequest ¶
func NewResponseServiceRequest(sr *models.FieldseekerServicerequest) ResponseServiceRequest
func NewResponseServiceRequests ¶
func NewResponseServiceRequests(requests models.FieldseekerServicerequestSlice) []ResponseServiceRequest
func (ResponseServiceRequest) Render ¶
func (srr ResponseServiceRequest) Render(w http.ResponseWriter, r *http.Request) error
type ResponseTrapData ¶
type ResponseTrapData struct {
Created string `json:"created"`
Description string `json:"description"`
H3Cell int64 `json:"h3cell"`
ID string `json:"id"`
Name string `json:"name"`
}
func NewResponseTrapData ¶
func NewResponseTrapData(data models.FieldseekerTraplocationSlice) []ResponseTrapData
func NewResponseTrapDatum ¶
func NewResponseTrapDatum(td *models.FieldseekerTraplocation) ResponseTrapData
func (ResponseTrapData) Render ¶
func (rtd ResponseTrapData) Render(w http.ResponseWriter, r *http.Request) error
Click to show internal directories.
Click to hide internal directories.