mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-29 03:11:56 +08:00
feat(wopi): implement required rest api as a WOPI host
This commit is contained in:
@@ -3,6 +3,7 @@ package wopi
|
||||
import (
|
||||
"encoding/gob"
|
||||
"encoding/xml"
|
||||
"net/url"
|
||||
)
|
||||
|
||||
// Response content from discovery endpoint.
|
||||
@@ -49,10 +50,21 @@ type Action struct {
|
||||
Newext string `xml:"newext,attr"`
|
||||
}
|
||||
|
||||
type Session struct {
|
||||
AccessToken string
|
||||
AccessTokenTTL int64
|
||||
ActionURL *url.URL
|
||||
}
|
||||
|
||||
type SessionCache struct {
|
||||
AccessToken string
|
||||
FileID uint
|
||||
UserID uint
|
||||
Action ActonType
|
||||
}
|
||||
|
||||
func init() {
|
||||
gob.Register(WopiDiscovery{})
|
||||
gob.Register(Action{})
|
||||
}
|
||||
|
||||
type Session struct {
|
||||
gob.Register(SessionCache{})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user