Documentation
¶
Index ¶
- Variables
- func AddRoutesRMO(r *mux.Router)
- func AddRoutesSync(r *mux.Router)
- func GetVersionInfo() version.VersionInfo
- func NewResponseServiceRequests(requests []model.Servicerequest) []types.ServiceRequest
- func SetEventChannel(chan_envelopes <-chan platform.Envelope)
- func SetVersionInfo(v version.VersionInfo)
- type Bounds
- type ConnectionSSE
- type ErrorAPI
- type FormEmail
- type FormResetTextHistory
- type FormSMS
- type FormSSE
- type H3Cell
- type Message
- type NoteAudioBreadcrumbPayload
- type NoteAudioPayload
- type NoteImagePayload
- type OrganizationResponse
- type OrganizationUpdateRequest
- type ProviderImage
- type ProviderImagesResponse
- type ProviderPricing
- type Renderable
- type ResponseClientIos
- type ResponseDistrict
- type ResponseErr
- type ResponseFieldseeker
- type ResponseMosquitoInspection
- type ResponseMosquitoSource
- type ResponseMosquitoTreatment
- type ResponseNote
- type ResponseTrapData
- type SizePricing
- type Status
- type VisionPricingResponse
- type VoipMSStatusPayload
- type VoipMSStatusPhoneFrom
- type VoipMSStatusPhoneTo
- type VoipMSStatusUpdate
- type VoipMSTextPostBody
Constants ¶
This section is empty.
Variables ¶
View Source
var (
TYPE_STATUS = "status"
)
Functions ¶
func AddRoutesRMO ¶
func AddRoutesSync ¶
func GetVersionInfo ¶
func GetVersionInfo() version.VersionInfo
func NewResponseServiceRequests ¶
func NewResponseServiceRequests(requests []model.Servicerequest) []types.ServiceRequest
func SetEventChannel ¶
func SetVersionInfo ¶
func SetVersionInfo(v version.VersionInfo)
Types ¶
type ConnectionSSE ¶
type ConnectionSSE struct {
// contains filtered or unexported fields
}
func (*ConnectionSSE) SendEvent ¶
func (c *ConnectionSSE) SendEvent(w http.ResponseWriter, m platform.Event) error
func (*ConnectionSSE) SendHeartbeat ¶
func (c *ConnectionSSE) SendHeartbeat(w http.ResponseWriter, t time.Time) error
type FormResetTextHistory ¶
type FormResetTextHistory struct {
E164 string `schema:"e164"`
}
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 OrganizationResponse ¶
type OrganizationResponse struct {
ID int32 `json:"id"`
Name string `json:"name"`
Website *string `json:"website"`
GeneralManagerName *string `json:"generalManagerName"`
OfficeAddressStreet *string `json:"officeAddressStreet"`
OfficeAddressCity *string `json:"officeAddressCity"`
OfficeAddressPostalCode *string `json:"officeAddressPostalCode"`
OfficePhone *string `json:"officePhone"`
OfficeFax *string `json:"officeFax"`
ServiceArea *types.ServiceArea `json:"serviceArea"`
SatelliteSurveillanceArea *types.ServiceArea `json:"satelliteSurveillanceArea"`
}
OrganizationResponse is the payload returned by GET /api/organization/{id}
type OrganizationUpdateRequest ¶
type OrganizationUpdateRequest struct {
Name *string `json:"name"`
Website *string `json:"website"`
GeneralManagerName *string `json:"generalManagerName"`
OfficeAddressStreet *string `json:"officeAddressStreet"`
OfficeAddressCity *string `json:"officeAddressCity"`
OfficeAddressPostalCode *string `json:"officeAddressPostalCode"`
OfficePhone *string `json:"officePhone"`
OfficeFax *string `json:"officeFax"`
ServiceAreaUploadUri *string `json:"serviceAreaUploadUri"`
SatelliteSurveillanceUploadUri *string `json:"satelliteSurveillanceUploadUri"`
}
OrganizationUpdateRequest is the payload accepted by PUT /api/organization/{id}
type ProviderImage ¶
type ProviderImagesResponse ¶
type ProviderImagesResponse struct {
Provider string `json:"provider"`
Images []ProviderImage `json:"images"`
}
type ProviderPricing ¶
type ProviderPricing struct {
Name string `json:"name"`
Sizes []SizePricing `json:"sizes"`
}
type Renderable ¶
type Renderable interface {
Render(http.ResponseWriter, *http.Request) error
}
type ResponseClientIos ¶
type ResponseClientIos struct {
Fieldseeker ResponseFieldseeker `json:"fieldseeker"`
Since time.Time `json:"since"`
}
func (ResponseClientIos) Render ¶
func (i ResponseClientIos) Render(w http.ResponseWriter, r *http.Request) error
type ResponseDistrict ¶
type ResponseDistrict struct {
Agency string `json:"agency"`
Manager string `json:"manager"`
Phone string `json:"phone"`
Website string `json:"website"`
}
func (ResponseDistrict) Render ¶
func (rd ResponseDistrict) 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
}
type renderer struct { }
func (ren *renderer) Render(w http.ResponseWriter, r *http.Request) error {
return nil
}
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 []types.ServiceRequest `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 model.Mosquitoinspection) ResponseMosquitoInspection
func NewResponseMosquitoInspections ¶
func NewResponseMosquitoInspections(inspections []model.Mosquitoinspection) []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 model.Treatment) ResponseMosquitoTreatment
func NewResponseMosquitoTreatments ¶
func NewResponseMosquitoTreatments(treatments []model.Treatment) []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 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 []model.Traplocation) []ResponseTrapData
func NewResponseTrapDatum ¶
func NewResponseTrapDatum(td model.Traplocation) ResponseTrapData
func (ResponseTrapData) Render ¶
func (rtd ResponseTrapData) Render(w http.ResponseWriter, r *http.Request) error
type SizePricing ¶
type SizePricing struct {
Slug string `json:"slug"`
Regions []string `json:"regions"`
PriceHourly float64 `json:"price_hourly"`
VCPUs int `json:"vcpus"`
MemoryMB int `json:"memory_mb"`
DiskGB int `json:"disk_gb"`
GPUModel string `json:"gpu_model,omitempty"`
GPUCount int `json:"gpu_count,omitempty"`
GPUVRAMGb float64 `json:"gpu_vram_gb,omitempty"`
}
type VisionPricingResponse ¶
type VisionPricingResponse struct {
Providers []ProviderPricing `json:"providers"`
}
type VoipMSStatusPayload ¶
type VoipMSStatusPayload struct {
ID int `json:"id"`
RecordType string `json:"record_type"`
From VoipMSStatusPhoneFrom `json:"from"`
To []VoipMSStatusPhoneTo `json:"to"`
Text string `json:"text"`
ReceivedAt string `json:"received_at"`
Type string `json:"type"`
}
type VoipMSStatusPhoneFrom ¶
type VoipMSStatusPhoneFrom struct {
PhoneNumber string `json:"phone_number"`
}
{
"data": {
"id": 101252305,
"event_type": "message.received",
"record_type": "event",
"payload": {
"id": 101252305,
"record_type": "message",
"from": {
"phone_number": "+18016984649"
},
"to": [
{
"phone_number": "+15593720139",
"status": "webhook_delivered"
}
],
"text": "test3",
"received_at": "2026-01-29T20:16:23.000000+00:00",
"type": "SMS",
"media": []
}
}
}
type VoipMSStatusPhoneTo ¶
type VoipMSStatusUpdate ¶
type VoipMSStatusUpdate struct {
ID int `json:"id"`
EventType string `json:"event_type"`
RecordType string `json:"record_type"`
Payload VoipMSStatusPayload `json:"payload"`
}
type VoipMSTextPostBody ¶
type VoipMSTextPostBody struct {
Data VoipMSStatusUpdate `json:"data"`
}
Source Files
¶
- api.go
- audio.go
- avatar.go
- configuration.go
- district.go
- event.go
- handler.go
- image.go
- lead.go
- organization.go
- password.go
- planet.go
- planet_tile.go
- publicreport.go
- review.go
- routes.go
- signal.go
- signin.go
- signup.go
- sudo.go
- sudo_organization.go
- tile.go
- twilio.go
- types.go
- user.go
- version.go
- vision_analysis.go
- vision_pricing.go
- vision_task.go
- vision_task_inference.go
- vision_task_mask.go
- vision_tile.go
- vision_worker_auth.go
- vision_worker_cache.go
- vision_worker_heartbeat.go
- vision_worker_started.go
- voipms.go
Click to show internal directories.
Click to hide internal directories.