package models import "time" type Host struct { ID uint `json:"id"` Name string `json:"name"` HostIP string `json:"hostIP"` Port int `json:"port"` User string `json:"user"` AuthType string `json:"authType"` Password string `json:"password"` PrivateKey string `json:"privateKey"` KeyPhrase string `json:"keyPhrase"` OS string `json:"os"` Arch string `json:"arch"` Status string `json:"status"` Labels string `json:"labels"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` } func (h *Host) Sanitized() map[string]interface{} { return map[string]interface{}{ "id": h.ID, "name": h.Name, "hostIP": h.HostIP, "port": h.Port, "user": h.User, "authType": h.AuthType, "os": h.OS, "arch": h.Arch, "status": h.Status, "labels": h.Labels, "createdAt": h.CreatedAt, "updatedAt": h.UpdatedAt, } }