Documentation ¶
Index ¶
- Constants
- func Run(apiKey, zmqEndpoint string) error
- type Content
- type Depth
- type Intensity
- type IsLast
- type LatLng
- type Magnitude
- type ReportTime
- type Serial
- type SocketRequest
- type SocketResponse
- type SocketResponseError
- type SocketResponseStatus
- type WebsocketData
- type WebsocketError
- type WebsocketPing
- type WebsocketStart
- type WebsocketType
Constants ¶
View Source
const (
DefaultZmqEndpoint = "tcp://127.0.0.1:5563"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Content ¶
type Content struct { EventId string Time *ReportTime AreaName string LatLng *LatLng Depth *Depth Magnitude Magnitude Intensity *Intensity Serial Serial IsLast IsLast Url string }
func (*Content) ParseCoordinate ¶
type Depth ¶
type Depth float64
func (*Depth) String ¶
https://www.data.jma.go.jp/suishin/jyouhou/pdf/566.pdf > ・震源の深さがごく浅い場合(0km) > (※「緊急地震速報(警報)」、「緊急地震速報(予報)」の場合、現行の運用では、震源の深さを「ごく浅い」とせずに、本要素の内容、属性「@description」において、震源の深さを 10km として扱い発表する。)
type ReportTime ¶
func (*ReportTime) String ¶
func (t *ReportTime) String() string
type SocketRequest ¶
type SocketResponse ¶
type SocketResponse struct { SocketResponseStatus Ticket string `json:"ticket"` Websocket struct { Id int `json:"id"` Url string `json:"url"` Protocol []string `json:"protocol"` Expiration int `json:"expiration"` } `json:"websocket"` Classifications []string `json:"classifications"` Test string `json:"test"` Types []string `json:"types"` Formats []string `json:"formats"` AppName *string `json:"appName"` }
func ParseSocketResponse ¶
func ParseSocketResponse(resp io.Reader) (*SocketResponse, error)
type SocketResponseError ¶
type SocketResponseError struct { SocketResponseStatus Error struct { Message string `json:"message"` Code int `json:"code"` } `json:"error"` }
type SocketResponseStatus ¶
type WebsocketData ¶
type WebsocketData struct { WebsocketType Version string `json:"version"` Id string `json:"id"` Classification string `json:"classification"` Passing []struct { Name string `json:"name"` Time time.Time `json:"time"` } `json:"passing"` Head struct { Type string `json:"type"` Author string `json:"author"` Target string `json:"target"` Time time.Time `json:"time"` Designation *string `json:"designation"` Test bool `json:"test"` Xml bool `json:"xml"` } `json:"head"` XmlReport any `json:"xmlReport"` Format *string `json:"format"` Compression *string `json:"compression"` Encoding *string `json:"encoding"` Body string `json:"body"` }
type WebsocketError ¶
type WebsocketError struct { WebsocketType Error string `json:"error"` Code int `json:"code"` Close bool `json:"close"` }
type WebsocketPing ¶
type WebsocketPing struct { WebsocketType PingId string `json:"pingId"` }
type WebsocketStart ¶
type WebsocketType ¶
type WebsocketType struct {
Type string `json:"type"`
}
Click to show internal directories.
Click to hide internal directories.