Documentation ¶
Index ¶
Constants ¶
View Source
const ( DiscoverResponseCacheKey = "wopi_discover" DiscoverRefreshDuration = 24 * 3600 // 24 hrs )
View Source
const ( SessionCachePrefix = "wopi_session_" AccessTokenQuery = "access_token" OverwriteHeader = wopiHeaderPrefix + "Override" ServerErrorHeader = wopiHeaderPrefix + "ServerError" RenameRequestHeader = wopiHeaderPrefix + "RequestedName" MethodLock = "LOCK" MethodUnlock = "UNLOCK" MethodRefreshLock = "REFRESH_LOCK" MethodRename = "RENAME_FILE" )
Variables ¶
View Source
var ( ActionPreview = ActonType("embedview") ActionPreviewFallback = ActonType("view") ActionEdit = ActonType("edit") )
Functions ¶
Types ¶
type Action ¶
type Action struct { Text string `xml:",chardata"` Name string `xml:"name,attr"` Ext string `xml:"ext,attr"` Default string `xml:"default,attr"` Urlsrc string `xml:"urlsrc,attr"` Requires string `xml:"requires,attr"` Targetext string `xml:"targetext,attr"` Progid string `xml:"progid,attr"` UseParent string `xml:"useParent,attr"` Newprogid string `xml:"newprogid,attr"` Newext string `xml:"newext,attr"` }
type Client ¶
type SessionCache ¶
type WopiDiscovery ¶
type WopiDiscovery struct { XMLName xml.Name `xml:"wopi-discovery"` Text string `xml:",chardata"` NetZone struct { Text string `xml:",chardata"` Name string `xml:"name,attr"` App []struct { Text string `xml:",chardata"` Name string `xml:"name,attr"` FavIconUrl string `xml:"favIconUrl,attr"` BootstrapperUrl string `xml:"bootstrapperUrl,attr"` AppBootstrapperUrl string `xml:"appBootstrapperUrl,attr"` ApplicationBaseUrl string `xml:"applicationBaseUrl,attr"` StaticResourceOrigin string `xml:"staticResourceOrigin,attr"` CheckLicense string `xml:"checkLicense,attr"` Action []Action `xml:"action"` } `xml:"app"` } `xml:"net-zone"` ProofKey struct { Text string `xml:",chardata"` Oldvalue string `xml:"oldvalue,attr"` Oldmodulus string `xml:"oldmodulus,attr"` Oldexponent string `xml:"oldexponent,attr"` Value string `xml:"value,attr"` Modulus string `xml:"modulus,attr"` Exponent string `xml:"exponent,attr"` } `xml:"proof-key"` }
Response content from discovery endpoint.
Click to show internal directories.
Click to hide internal directories.