Documentation ¶
Overview ¶
*
* * (c) Copyright Ascensio System SIA 2023 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *
*
* * (c) Copyright Ascensio System SIA 2023 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *
*
* * (c) Copyright Ascensio System SIA 2023 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *
*
* * (c) Copyright Ascensio System SIA 2023 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *
*
* * (c) Copyright Ascensio System SIA 2023 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *
Index ¶
Constants ¶
Variables ¶
View Source
var ErrOnlyofficeBase64Decoding = errors.New(_OnlyofficeLoggerPrefix + "base64 decoding error")
View Source
var ErrOnlyofficeExtensionNotSupported = errors.New(_OnlyofficeLoggerPrefix + "this extension is not supported")
View Source
var ErrOnlyofficePermissionUnmarshal = errors.New(_OnlyofficeLoggerPrefix + "could not unmarshal permissions")
View Source
var OnlyofficeEditableExtensions map[string]string = map[string]string{ "xlsx": OnlyofficeCellType, "pptx": OnlyofficeSlideType, "docx": OnlyofficeWordType, }
View Source
var OnlyofficeFileExtensions map[string]string = map[string]string{ "xls": OnlyofficeCellType, "xlsx": OnlyofficeCellType, "xlsm": OnlyofficeCellType, "xlt": OnlyofficeCellType, "xltx": OnlyofficeCellType, "xltm": OnlyofficeCellType, "ods": OnlyofficeCellType, "fods": OnlyofficeCellType, "ots": OnlyofficeCellType, "csv": OnlyofficeCellType, "pps": OnlyofficeSlideType, "ppsx": OnlyofficeSlideType, "ppsm": OnlyofficeSlideType, "ppt": OnlyofficeSlideType, "pptx": OnlyofficeSlideType, "pptm": OnlyofficeSlideType, "pot": OnlyofficeSlideType, "potx": OnlyofficeSlideType, "potm": OnlyofficeSlideType, "odp": OnlyofficeSlideType, "fodp": OnlyofficeSlideType, "otp": OnlyofficeSlideType, "doc": OnlyofficeWordType, "docx": OnlyofficeWordType, "docm": OnlyofficeWordType, "dot": OnlyofficeWordType, "dotx": OnlyofficeWordType, "dotm": OnlyofficeWordType, "odt": OnlyofficeWordType, "fodt": OnlyofficeWordType, "ott": OnlyofficeWordType, "rtf": OnlyofficeWordType, "txt": OnlyofficeWordType, "html": OnlyofficeWordType, "htm": OnlyofficeWordType, "mht": OnlyofficeWordType, "pdf": OnlyofficeWordType, "djvu": OnlyofficeWordType, "fb2": OnlyofficeWordType, "epub": OnlyofficeWordType, "xps": OnlyofficeWordType, }
Functions ¶
This section is empty.
Types ¶
type OnlyofficeHelper ¶
type OnlyofficeHelper interface { IsExtensionSupported(fileExt string) bool IsExtensionEditable(fileExt string) bool GetFileType(fileExt string) (string, error) GenerateKey() string GetPostPermissionsByFileID(fileID string, post *mmModel.Post, getUser func(string) (*mmModel.User, *mmModel.AppError)) []model.UserInfoResponse GetFilePermissionsByUserID(userID string, fileID string, post *mmModel.Post) model.Permissions UserHasFilePermissions(userID string, fileID string, post *mmModel.Post) bool SetPostFilePermissions(post *mmModel.Post, permissions []model.PostPermission) []model.PostPermission GetWildcardUser() string }
func NewOnlyofficeHelper ¶
func NewOnlyofficeHelper() OnlyofficeHelper
Click to show internal directories.
Click to hide internal directories.