Debian Codegraph @

xmpp_http_upload.go

raw
1 package xmpp
2
3 import (
4 "encoding/xml"
5 )
6
7 type Slot struct {
8 // TODO: Maybe this doesn't belong here
9 ID string
10 XMLName xml.Name `xml:"slot"`
11 Put Put
12 Get Get
13 }
14
15 type Put struct {
16 XMLName xml.Name `xml:"put"`
17 Url string `xml:"url,attr"`
18 Headers []Header `xml:"header"`
19 }
20
21 type Get struct {
22 XMLName xml.Name `xml:"get"`
23 Url string `xml:"url,attr"`
24 }
25
26 type Header struct {
27 XMLName xml.Name `xml:"header"`
28 Name string `xml:"name,attr"`
29 Value string `xml:",innerxml"`
30 }
31
32 // Oob is an out-of-band url/description, used in file uploads.
33 // See https://xmpp.org/extensions/xep-0066.html
34 type Oob struct {
35 XMLName xml.Name `xml:"x,xmlns:jabber:x:oob"`
36 Url string `xml:"url"`
37 Desc string `xml:"desc"`
38 }