package originclient // Payload is the JSON body posted to Origin's public service-checkin // endpoint. Field names and requiredness mirror // POST /api/public/service-checkin as documented in // origin/doc/service-checkin.md: Type, Version, Name, and UniqueInstallID // are required; everything else is optional and, when omitted, does not // overwrite existing instance data on Origin's side. type Payload struct { Type string `json:"type"` Version string `json:"version"` Name string `json:"name"` UniqueInstallID string `json:"unique_install_id"` Site string `json:"site,omitempty"` Environment string `json:"environment,omitempty"` DatabaseType string `json:"database_type,omitempty"` DatabaseName string `json:"database_name,omitempty"` AppType string `json:"app_type,omitempty"` Hostname string `json:"hostname,omitempty"` Port int `json:"port,omitempty"` BaseURL string `json:"base_url,omitempty"` InternalURL string `json:"internal_url,omitempty"` ContainerID string `json:"container_id,omitempty"` Orchestrator string `json:"orchestrator,omitempty"` Description string `json:"description,omitempty"` } // Response is returned by Origin after a successful check-in. type Response struct { Success bool `json:"success"` ServiceInstanceID int64 `json:"service_instance_id"` UniqueInstallID string `json:"unique_install_id"` Status string `json:"status"` PingedAt string `json:"pinged_at"` }