Documentation ¶
Index ¶
Constants ¶
View Source
const HEALTHY = "healthy"
HEALTHY is the constant for healthySymptom
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GeoAgg ¶
type GeoAgg struct {
Buckets []GeoAggBucket `json:"buckets"`
}
type GeoAggBucket ¶
type GeoLocation ¶
GeoLocation ...
type Location ¶
type Location struct { Name string `json:"name,omitempty" validate:"max=255"` City string `json:"city,omitempty" validate:"max=255"` Region string `json:"region,omitempty" validate:"max=255"` Country string `json:"country,omitempty" validate:"max=255"` Street string `json:"street,omitempty" validate:"max=255"` Zip string `json:"zip,omitempty" validate:"max=255"` Location GeoLocation `json:"geolocation"` }
Location represents a location (...)
type LogSearchResults ¶
type LogSearchResults struct { Count int64 `json:"count"` GeoLocations []*GeoAggBucket `json:"geolocations"` Symptoms }
type LogUser ¶
type LogUser struct { ID string `json:"_id,omitempty" validate:"max=255"` Locations []*Location `json:"locations" validate:"dive,max=100"` }
LogUser ...
type Logg ¶
type Logg struct { ID string `json:"_id,omitempty"` User *LogUser `json:"user" validate:"dive"` Symptoms []string `json:"symptoms" validate:"max=100"` WorkSituation string `json:"workSituation,omitempty" validate:"max=100"` DailySituation string `json:"dailySituation,omitempty" validate:"max=100"` Locations []*Location `json:"locations" validate:"dive,max=1000"` Features []*Feature `json:"features"` CreatedAt string `json:"createdat"` }
Logg ...
type SymptomBucket ¶
type SymptomBucket struct { Symptom interface{} `json:"symptom"` Count int64 `json:"count"` }
func SetupSymptomsAggArr ¶
func SetupSymptomsAggArr(items *elastic.AggregationBucketKeyItems) []*SymptomBucket
SetupSymptomsAggArr ...
type Symptoms ¶
type Symptoms struct { Unhealthy *SymptomsAgg `json:"unhealthy"` Healthy *SymptomsAgg `json:"healthy"` DailySituations *SymptomsAgg `json:"dailySituation"` }
func (*Symptoms) AnonymizeNeededSymptomsAgg ¶
func (s *Symptoms) AnonymizeNeededSymptomsAgg()
AnonymizeNeededSymptomsAgg ...
func (*Symptoms) SetupSymptomsByAgg ¶
func (s *Symptoms) SetupSymptomsByAgg(ag *elastic.Aggregations)
SetupSymptomsByAgg ...
type SymptomsAgg ¶
type SymptomsAgg struct { Count int64 `json:"count"` Buckets []*SymptomBucket `json:"buckets"` }
func (*SymptomsAgg) SetupBucket ¶
func (s *SymptomsAgg) SetupBucket(bucket *elastic.AggregationBucketKeyItem)
SetupBucket ...
func (*SymptomsAgg) SetupSymptomsAgg ¶
func (s *SymptomsAgg) SetupSymptomsAgg(items *elastic.AggregationBucketKeyItems)
SetupSymptomsAgg ...
type User ¶
type User struct { ID string `json:"_id,omitempty" validate:"max=255"` Email string `json:"email,omitempty" validate:"required,email"` EmailVerified bool `json:"emailVerified"` Locations []*Location `json:"locations" validate:"dive,max=100"` }
User ...
func (*User) PrepareUserForCreation ¶
PrepareUserForCreation validates the model
func (*User) PrepareUserForGet ¶
func (user *User) PrepareUserForGet()
PrepareUserForGet cleans up the model and prepares it for external use
Click to show internal directories.
Click to hide internal directories.