Documentation ¶
Index ¶
- func Convert(data bson.M) (interface{}, error)
- type Area
- type AreaByConfidence
- type AreaByGrade
- type AreaConfidence
- type EEW
- type EEWArea
- type EEWRecord
- type Earthquake
- type EarthquakeRecord
- type FirstHeight
- type ForecastArea
- type Hypocenter
- type Issue
- type MaxHeight
- type Point
- type PointsByPref
- type PointsByScale
- type SortableArea
- type Tsunami
- type TsunamiRecord
- type Userquake
- type UserquakeRecord
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Area ¶
type Area struct { Name string `bson:"name"` Grade string `bson:"grade"` Immediate bool `bson:"immediate"` FirstHeight FirstHeight `bson:"firstHeight"` MaxHeight MaxHeight `bson:"maxHeight"` }
type AreaByConfidence ¶
type AreaByGrade ¶
type AreaByGrade struct { Grade string Areas []ForecastArea }
type AreaConfidence ¶
type AreaConfidence struct {
Confidence float64 `bson:"confidence"`
}
type EEW ¶
type EEWRecord ¶
type EEWRecord struct { ID primitive.ObjectID `bson:"_id"` Earthquake struct { Hypocenter struct { Name string `bson:"name"` } `bson:"hypocenter"` } `bson:"earthquake"` Issue struct { Time string `bson:"time"` Serial string `bson:"serial"` } `bson:"issue"` Cancelled bool `bson:"cancelled"` Areas []EEWArea `bson:"areas"` }
type Earthquake ¶
type Earthquake struct { Raw string Code int ObjectID string MaxScale string IssueTime string IssueType string OccurredTime string ShortTime string Hypocenter string IsEruption bool FreeFormComments []string Tsunami string ForeignTsunami string Points []PointsByPref PointsByScale []PointsByScale }
func ToEarthquake ¶
func ToEarthquake(data primitive.M) (*Earthquake, error)
type EarthquakeRecord ¶
type EarthquakeRecord struct { ID primitive.ObjectID `bson:"_id"` Earthquake struct { MaxScale int `bson:"maxScale"` Time string `bson:"time"` DomesticTsunami string `bson:"domesticTsunami"` ForeignTsunami string `bson:"foreignTsunami"` Hypocenter Hypocenter `bson:"hypocenter"` } `bson:"earthquake"` Issue struct { Type string `bson:"type"` Time string `bson:"time"` } `bson:"issue"` Points []Point `bson:"points"` Comments struct { FreeFormComment string `bson:"freeFormComment"` } `bson:"comments"` }
type FirstHeight ¶
type ForecastArea ¶
type Hypocenter ¶
type PointsByPref ¶
type PointsByPref struct { Pref string Points []PointsByScale }
type PointsByScale ¶
func (PointsByScale) PointString ¶
func (ps PointsByScale) PointString() string
type SortableArea ¶
type Tsunami ¶
type TsunamiRecord ¶
type Userquake ¶
type UserquakeRecord ¶
Click to show internal directories.
Click to hide internal directories.