Documentation
¶
Index ¶
Constants ¶
View Source
const ( // StatusReadyForSaving is used when the file should be saved after being // edited. StatusReadyForSaving = 2 // StatusForceSaveRequested is used when the file has been modified and // should be saved, even if the document is still opened and can be edited // by users. StatusForceSaveRequested = 6 )
Status list is described on https://api.onlyoffice.com/editors/callback#status
Variables ¶
View Source
var ( // ErrNoServer is used when no OnlyOnffice server is configured for the // current context ErrNoServer = errors.New("No OnlyOnffice server is configured") // ErrInvalidFile is used when a file is not an office document ErrInvalidFile = errors.New("Invalid file, not an office document") // ErrInternalServerError is used when something goes wrong (like no // connection to redis) ErrInternalServerError = errors.New("Internal server error") )
Functions ¶
Types ¶
type CallbackParameters ¶
type CallbackParameters struct {
Key string `json:"key"`
Status int `json:"status"`
URL string `json:"url"`
Token string `json:"-"` // From the Authorization header
}
CallbackParameters is a struct for the parameters sent by the document server to the stack. Cf https://api.onlyoffice.com/editors/callback
type Opener ¶
type Opener struct {
*sharing.FileOpener
}
Opener can be used to find the parameters for opening an office document.
type Store ¶
type Store interface {
AddDoc(db prefixer.Prefixer, payload conflictDetector) (string, error)
GetDoc(db prefixer.Prefixer, secret string) (*conflictDetector, error)
UpdateDoc(db prefixer.Prefixer, secret string, payload conflictDetector) error
RemoveDoc(db prefixer.Prefixer, secret string) error
}
Store is an object to store and retrieve document server keys <-> id,rev
Click to show internal directories.
Click to hide internal directories.