2 * Copyright (C) 2017 "IoT.bzh"
3 * Author Sebastien Douheret <sebastien@iot.bzh>
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
20 // EventRegisterArgs Parameters (json format) of /events/register command
21 type EventRegisterArgs struct {
22 Name string `json:"name"`
23 ProjectID string `json:"filterProjectID"`
26 // EventUnRegisterArgs Parameters of /events/unregister command
27 type EventUnRegisterArgs struct {
28 Name string `json:"name"`
32 // EventMsg Message send
33 type EventMsg struct {
34 Time string `json:"time"`
35 Type string `json:"type"`
36 Folder FolderConfig `json:"folder"`
39 // EventEvent Event send in WS when an internal event (eg. Syncthing event is received)
41 // EventTypePrefix Used as event prefix
42 EventTypePrefix = "event:" // following by event type
44 // Supported Events type
45 EVTAll = EventTypePrefix + "all"
46 EVTFolderChange = EventTypePrefix + "folder-change" // type EventMsg with Data type xsapiv1.???
47 EVTFolderStateChange = EventTypePrefix + "folder-state-change" // type EventMsg with Data type xsapiv1.???