-
Notifications
You must be signed in to change notification settings - Fork 5
/
stream.go
31 lines (25 loc) · 805 Bytes
/
stream.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package nouns
import (
"encoding/xml"
)
type StreamAttributes struct {
ConnectorName *string `xml:"connectorName,attr,omitempty"`
Name *string `xml:"name,attr,omitempty"`
StatusCallback *string `xml:"statusCallback,attr,omitempty"`
StatusCallbackMethod *string `xml:"statusCallbackMethod,attr,omitempty"`
Track *string `xml:"track,attr,omitempty"`
URL *string `xml:"url,attr,omitempty"`
}
type Stream struct {
XMLName xml.Name `xml:"Stream"`
StreamAttributes
Children []interface{}
}
func (s *Stream) Parameter() {
s.ParameterWithAttributes(ParameterAttributes{})
}
func (s *Stream) ParameterWithAttributes(attributes ParameterAttributes) {
s.Children = append(s.Children, &Parameter{
ParameterAttributes: attributes,
})
}