Documentation ¶
Index ¶
- Constants
- type Alert
- type Area
- type Category
- func (category *Category) MarshalJSON() ([]byte, error)
- func (category *Category) MarshalXML(e *xml.Encoder, start xml.StartElement) error
- func (category Category) String() string
- func (category *Category) UnmarshalJSON(b []byte) error
- func (category *Category) UnmarshalString(value string) error
- func (category *Category) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
- type Certainty
- func (certainty *Certainty) MarshalJSON() ([]byte, error)
- func (certainty *Certainty) MarshalXML(e *xml.Encoder, start xml.StartElement) error
- func (certainty Certainty) String() string
- func (certainty *Certainty) UnmarshalJSON(b []byte) error
- func (certainty *Certainty) UnmarshalString(str string) error
- func (certainty *Certainty) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
- type Circle
- type Circles
- type Info
- type KeyValue
- type List
- type MessageType
- func (messageType *MessageType) MarshalJSON() ([]byte, error)
- func (messageType *MessageType) MarshalXML(e *xml.Encoder, start xml.StartElement) error
- func (messageType MessageType) String() string
- func (messageType *MessageType) UnmarshalJSON(b []byte) error
- func (messageType *MessageType) UnmarshalString(str string) error
- func (messageType *MessageType) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
- type Polygon
- type Polygons
- type Reference
- type References
- type Resource
- type ResponseType
- func (responseType *ResponseType) MarshalJSON() ([]byte, error)
- func (responseType *ResponseType) MarshalXML(e *xml.Encoder, start xml.StartElement) error
- func (responseType ResponseType) String() string
- func (responseType *ResponseType) UnmarshalJSON(b []byte) error
- func (responseType *ResponseType) UnmarshalString(str string) error
- func (responseType *ResponseType) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
- type Scope
- func (scope *Scope) MarshalJSON() ([]byte, error)
- func (scope *Scope) MarshalXML(e *xml.Encoder, start xml.StartElement) error
- func (scope Scope) String() string
- func (scope *Scope) UnmarshalJSON(b []byte) error
- func (scope *Scope) UnmarshalString(str string) error
- func (scope *Scope) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
- type Severity
- func (severity *Severity) MarshalJSON() ([]byte, error)
- func (severity *Severity) MarshalXML(e *xml.Encoder, start xml.StartElement) error
- func (severity Severity) String() string
- func (severity *Severity) UnmarshalJSON(b []byte) error
- func (severity *Severity) UnmarshalString(str string) error
- func (severity *Severity) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
- type Status
- func (status *Status) MarshalJSON() ([]byte, error)
- func (status *Status) MarshalXML(e *xml.Encoder, start xml.StartElement) error
- func (status Status) String() string
- func (status *Status) UnmarshalJSON(b []byte) error
- func (status *Status) UnmarshalString(str string) error
- func (status *Status) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
- type Time
- type Urgency
- func (urgency *Urgency) MarshalJSON() ([]byte, error)
- func (urgency *Urgency) MarshalXML(e *xml.Encoder, start xml.StartElement) error
- func (urgency Urgency) String() string
- func (urgency *Urgency) UnmarshalJSON(b []byte) error
- func (urgency *Urgency) UnmarshalString(str string) error
- func (urgency *Urgency) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
Constants ¶
const ( CategoryUnknown = iota CategoryGeological CategoryMeteorological CategorySafety CategorySecurity CategoryRescue CategoryFire CategoryHealth CategoryEnvironment CategoryTransport CategoryInfrastructure CategoryCBRNE CategoryOther )
const ( CertaintyUnknown = iota CertaintyObserved CertaintyLikely CertaintyPossible CertaintyUnlikely )
const ( MessageTypeUnknown = iota MessageTypeAlert MessageTypeUpdate MessageTypeCancel MessageTypeAck MessageTypeError )
const ( ResponseTypeUnknown = iota ResponseTypeShelter ResponseTypeEvacuate ResponseTypePrepare ResponseTypeExecute ResponseTypeAvoid ResponseTypeMonitor ResponseTypeAssess ResponseTypeAllClear ResponseTypeNone )
const ( ScopeUnknown = iota ScopePublic ScopeRestricted ScopePrivate )
const ( SeverityUnknown = iota SeverityExtreme SeveritySevere SeverityModerate SeverityMinor )
const ( StatusUnknown = iota StatusActual StatusExcercise StatusSystem StatusTest StatusDraft )
const ( UrgencyUnknown = iota UrgencyImmediate UrgencyExpected UrgencyFuture UrgencyPast )
const (
TimeFormat = "2006-01-02T15:04:05-07:00"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Alert ¶
type Alert struct { XMLName xml.Name `xml:"alert" json:"-"` Identifier string `xml:"identifier" json:"identifier"` Sender string `xml:"sender" json:"sender"` Sent Time `xml:"sent" json:"sent"` Status Status `xml:"status" json:"status"` MessageType MessageType `xml:"msgType" json:"message_type"` Source *string `xml:"source" json:"source"` Scope Scope `xml:"scope" json:"scope"` Restriction *string `xml:"restriction" json:"restriction"` Addresses List `xml:"addresses" json:"addresses"` Codes []string `xml:"code" json:"codes"` Note *string `xml:"note" json:"note"` References References `xml:"references" json:"references"` Incidents List `xml:"incidents" json:"incidents"` Infos []Info `xml:"info" json:"infos"` }
type Area ¶
type Area struct { XMLName xml.Name `xml:"area" json:"-"` Description string `xml:"areaDesc" json:"description"` Polygons Polygons `xml:"polygon" json:"polygons"` Circles Circles `xml:"circle" json:"circles"` GeoCodes KeyValue `xml:"geocode" json:"geocodes"` Altitude *int `xml:"altitude" json:"altitude"` Ceiling *int `xml:"ceiling" json:"ceiling"` }
type Category ¶
type Category int
func (*Category) MarshalJSON ¶
MarshalJSON returns the string version of the category.
func (*Category) MarshalXML ¶
MarshalXML returns the string version of the status.
func (*Category) UnmarshalJSON ¶
UnmarshalJSON unmarshals the JSON into a Category value.
func (*Category) UnmarshalString ¶
UnmarshalString unmarshals the string into a Category value
func (*Category) UnmarshalXML ¶
UnmarshalXML unmarshals the XML into a Category value.
type Certainty ¶
type Certainty int
func (*Certainty) MarshalJSON ¶
MarshalJSON returns the string version of the certainty.
func (*Certainty) MarshalXML ¶
MarshalXML returns the string version of the certainty.
func (*Certainty) UnmarshalJSON ¶
UnmarshalJSON unmarshals the JSON into a Certainty value.
func (*Certainty) UnmarshalString ¶
UnmarshalString unmarshals the string into a Certainty value.
func (*Certainty) UnmarshalXML ¶
UnmarshalXML unmarshals the XML into a Certainty value.
type Info ¶
type Info struct { XMLName xml.Name `xml:"info" json:"-"` Language string `xml:"language" json:"language"` Categories []Category `xml:"category" json:"categories"` Event string `xml:"event" json:"event"` ResponseTypes []ResponseType `xml:"responseType" json:"response_types"` Urgency Urgency `xml:"urgency" json:"urgency"` Severity Severity `xml:"severity" json:"severity"` Certainty Certainty `xml:"certainty" json:"certainty"` Audience string `xml:"audience" json:"audience"` EventCodes KeyValue `xml:"eventCode" json:"event_codes"` Effective *Time `xml:"effective" json:"effective"` Onset *Time `xml:"onset" json:"onset"` Expires *Time `xml:"expires" json:"expires"` SenderName string `xml:"senderName" json:"sender_name"` Headline string `xml:"headline" json:"headline"` Description string `xml:"description" json:"description"` Instruction string `xml:"instruction" json:"instruction"` Web string `xml:"web" json:"web"` Contact string `xml:"contact" json:"contact"` Parameters KeyValue `xml:"parameter" json:"parameters"` Resources []Resource `xml:"resource" json:"resources"` Areas []Area `xml:"area" json:"areas"` }
type MessageType ¶
type MessageType int
func (*MessageType) MarshalJSON ¶
func (messageType *MessageType) MarshalJSON() ([]byte, error)
MarshalJSON returns the string version of the message type.
func (*MessageType) MarshalXML ¶
func (messageType *MessageType) MarshalXML(e *xml.Encoder, start xml.StartElement) error
MarshalXML returns the string version of the message type.
func (MessageType) String ¶
func (messageType MessageType) String() string
String returns a MessageType as a string
func (*MessageType) UnmarshalJSON ¶
func (messageType *MessageType) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshals the XML into a MessageType value.
func (*MessageType) UnmarshalString ¶
func (messageType *MessageType) UnmarshalString(str string) error
UnmarshalString unmarshals the string into a MessageType value.
func (*MessageType) UnmarshalXML ¶
func (messageType *MessageType) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
UnmarshalXML unmarshals the XML into a MessageType value.
type Polygon ¶
func (*Polygon) UnmarshalXML ¶
type Reference ¶
type References ¶
type References []*Reference
func (*References) MarshalXML ¶
func (m *References) MarshalXML(e *xml.Encoder, start xml.StartElement) error
func (*References) UnmarshalXML ¶
func (m *References) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
type Resource ¶
type Resource struct { XMLName xml.Name `xml:"resource" json:"-"` Description string `xml:"resourceDesc" json:"description"` MimeType string `xml:"mimeType" json:"mime_type"` Size int `xml:"size" json:"size"` Uri string `xml:"uri" json:"uri"` Digest string `xml:"digest" json:"digest"` DerefUri *string `xml:"derefUri" json:"deref_uri"` }
type ResponseType ¶
type ResponseType int
func (*ResponseType) MarshalJSON ¶
func (responseType *ResponseType) MarshalJSON() ([]byte, error)
MarshalJSON returns the string version of the response type.
func (*ResponseType) MarshalXML ¶
func (responseType *ResponseType) MarshalXML(e *xml.Encoder, start xml.StartElement) error
MarshalXML returns the string version of the response type.
func (ResponseType) String ¶
func (responseType ResponseType) String() string
String returns a ResponseType as a string
func (*ResponseType) UnmarshalJSON ¶
func (responseType *ResponseType) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshals the JSON into a ResponseType value.
func (*ResponseType) UnmarshalString ¶
func (responseType *ResponseType) UnmarshalString(str string) error
UnmarshalString unmarshals the string into a ResponseType value.
func (*ResponseType) UnmarshalXML ¶
func (responseType *ResponseType) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
UnmarshalXML unmarshals the XML into a ResponseType value.
type Scope ¶
type Scope int
func (*Scope) MarshalJSON ¶
MarshalJSON returns the string version of the scope.
func (*Scope) MarshalXML ¶
MarshalXML returns the string version of the scope.
func (*Scope) UnmarshalJSON ¶
UnmarshalJSON unmarshals the JSON into a Scope value.
func (*Scope) UnmarshalString ¶
UnmarshalString unmarshals the string into a Scope value.
func (*Scope) UnmarshalXML ¶
UnmarshalXML unmarshals the XML into a Scope value.
type Severity ¶
type Severity int
func (*Severity) MarshalJSON ¶
MarshalJSON returns the string version of the severity.
func (*Severity) MarshalXML ¶
MarshalXML returns the string version of the severity.
func (*Severity) UnmarshalJSON ¶
UnmarshalJSON unmarshals the JSON into a Severity value.
func (*Severity) UnmarshalString ¶
UnmarshalString unmarshals the string into a Severity value.
func (*Severity) UnmarshalXML ¶
UnmarshalXML unmarshals the XML into a Severity value.
type Status ¶
type Status int
func (*Status) MarshalJSON ¶
MarshalJSON returns the string version of the status.
func (*Status) MarshalXML ¶
MarshalXML returns the string version of the status.
func (*Status) UnmarshalJSON ¶
UnmarshalJSON unmarshals the JSON into a Status value.
func (*Status) UnmarshalString ¶
UnmarshalString unmarshals the string into a Status value.
func (*Status) UnmarshalXML ¶
UnmarshalXML unmarshals the XML into a Status value.
type Urgency ¶
type Urgency int
func (*Urgency) MarshalJSON ¶
MarshalJSON returns the string version of the urgency.
func (*Urgency) MarshalXML ¶
MarshalXML returns the string version of the urgency.
func (*Urgency) UnmarshalJSON ¶
UnmarshalJSON unmarshals the JSON into a Urgency value.
func (*Urgency) UnmarshalString ¶
UnmarshalString unmarshals the string into a Urgency value.
func (*Urgency) UnmarshalXML ¶
UnmarshalXML unmarshals the XML into a Urgency value.