controllers

package
v0.0.0-...-78fc42a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 20, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is a middleman between the websocket connection and the hub.

type CommonCallback

type CommonCallback struct {
	Key    string `json:"key"`
	Status int    `json:"status"`
}

CommonCallback 通用回调状态

type EditHasPrepareSave

type EditHasPrepareSave struct {
	Key        string `json:"key"`
	Status     int    `json:"status"`
	Url        string `json:"url"`
	ChangesUrl string `json:"changesurl"`
	History    struct {
		ServerVersion string `json:"serverVersion"`
		Changes       []struct {
			Created string `json:"created"`
			User    struct {
				Id   string `json:"id"`
				Name string `json:"name"`
			} `json:"user"`
		} `json:"changes"`
	} `json:"history"`
	Users   []string `json:"users"`
	Actions []struct {
		Type   int    `json:"type"`
		Userid string `json:"userid"`
	} `json:"actions"`
	LastSave    time.Time `json:"lastsave"`
	NotModified bool      `json:"notmodified"`
	Filetype    string    `json:"filetype"`
}

EditHasPrepareSave 2- 文档已准备好保存,

type EditHasSaved

type EditHasSaved struct {
	Key        string `json:"key"`
	Status     int    `json:"status"`
	Url        string `json:"url"`
	ChangesUrl string `json:"changesurl"`
	History    struct {
		ServerVersion string `json:"serverVersion"`
		Changes       []struct {
			Created string `json:"created"`
			User    struct {
				Id   string `json:"id"`
				Name string `json:"name"`
			} `json:"user"`
		} `json:"changes"`
	} `json:"history"`
	Users   []string `json:"users"`
	Actions []struct {
		Type   int    `json:"type"`
		Userid string `json:"userid"`
	} `json:"actions"`
	LastSave      time.Time `json:"lastsave"`
	ForceSaveType int       `json:"forcesavetype"`
	Filetype      string    `json:"filetype"`
}

EditHasSaved 6 文档正在编辑,但当前文档状态已保存,

type Hub

type Hub struct {
	// contains filtered or unexported fields
}

Hub maintains the set of active clients and broadcasts messages to the clients.

type OnlyController

type OnlyController struct {
	web.Controller
}

func (*OnlyController) AddOnlyAttachment

func (c *OnlyController) AddOnlyAttachment()

AddOnlyAttachment 批量添加一对一模式 要避免同名覆盖的严重bug!!!!

func (*OnlyController) DocCallback

func (c *OnlyController) DocCallback()

DocCallback 协作页面的保存和回调 关闭浏览器标签后获取最新文档保存到文件夹

func (*OnlyController) DownloadDoc

func (c *OnlyController) DownloadDoc()

DownloadDoc 协作页面下载的文档,采用绝对路径型式

func (*OnlyController) OnlyOffice

func (c *OnlyController) OnlyOffice()

func (*OnlyController) OverwriteDoc

func (c *OnlyController) OverwriteDoc()

OverwriteDoc 协作页面覆盖的文档,采用绝对路径型式

type WebsocketController

type WebsocketController struct {
	web.Controller
}

func (*WebsocketController) WsHandler

func (w *WebsocketController) WsHandler()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL