Documentation ¶
Index ¶
- Constants
- Variables
- func CanReturnPSByMS(prevSyncMeta *types.SyncMetadata, currSyncMeta *types.SyncMetadata) bool
- func ChangeTrueInComparelistIfExisted(comparelist []*types.ComparingSyncMetadata, path string) *types.ComparingSyncMetadata
- func CheckCanOverwrite(LastSyncTimestamp uint64, LastUpdateTimestamp uint64, ...) bool
- func CheckInternetConnection() bool
- func ChooseOne(path string, Side string) error
- func ClientRegistration(ClientPassword string, SIP string, SPort string) error
- func CloseConnect()
- func ConfigServer(host string, port string) string
- func ConflictDownload(path string) error
- func ConnectServer(uuid string) (*qp.Connection, error)
- func DirWatchAdd(rootpath string)
- func DirWatchStart()
- func DirWatchStop(rootpath string)
- func DisconnectClient() error
- func DisconnectRootDir(path string) (qstypes.DisconnectRootDirRes, error)
- func ForceSyncMain()
- func FullScanMain()
- func GetComparelistIfNotExisted(comparelist []*types.ComparingSyncMetadata) []*types.ComparingSyncMetadata
- func GetConflictList() ([]qstypes.Conflict, error)
- func GetRemoteRootList() (qstypes.AskRootDirRes, error)
- func GetShareLink(path string, MaxCnt uint64) (string, error)
- func HistoryDownload(path string, version uint64) error
- func HistoryShow(path string, cntfromhead uint64) ([]qstypes.FileHistory, error)
- func InitQPClient()
- func InitWatcher()
- func MustSyncMain()
- func NeedContentMain()
- func PSwhenCreate(path string, info os.FileInfo)
- func PSwhenRemove(path string)
- func PSwhenWrite(path string, info os.FileInfo, syncMetadata types.SyncMetadata)
- func PleaseSync(path string)
- func PrintCFOptions() (string, error)
- func Reconnect()
- func RegistRootDir(LocalRootDir string, RootDirPW string, Side string) error
- func Rescan() error
- func RollBack(path string, version uint64) error
- func ShowStatus(filepath string) (string, error)
- func StopShare(link string) error
- func WatchStop()
Constants ¶
const ( SERVER = "SERVER" LOCAL = "LOCAL" )
Variables ¶
var ( QPClient *qp.QP Conn *qp.Connection Watcher *fsnotify.Watcher PSMut map[byte]*sync.Mutex PSMutModNum uint8 = 64 )
var ClientPW string
Functions ¶
func CanReturnPSByMS ¶
func CanReturnPSByMS(prevSyncMeta *types.SyncMetadata, currSyncMeta *types.SyncMetadata) bool
func ChangeTrueInComparelistIfExisted ¶
func ChangeTrueInComparelistIfExisted(comparelist []*types.ComparingSyncMetadata, path string) *types.ComparingSyncMetadata
ChangeTrueInComparelistIfExisted changes IsExisted true if path is existed in comparelist
func CheckCanOverwrite ¶
func CheckCanOverwrite(LastSyncTimestamp uint64, LastUpdateTimestamp uint64, LastestSyncTimestamp uint64) bool
CheckCanOverwrite checks whether the file can be overwritten
func CheckInternetConnection ¶
func CheckInternetConnection() bool
func ClientRegistration ¶
@URL /api/v1/connect/server ex. RegisterClientRequest("password", "S_IP", "S_PORT")
func CloseConnect ¶
func CloseConnect()
func ConfigServer ¶
func ConnectServer ¶
func ConnectServer(uuid string) (*qp.Connection, error)
func DirWatchAdd ¶
func DirWatchAdd(rootpath string)
func DirWatchStart ¶
func DirWatchStart()
func DirWatchStop ¶
func DirWatchStop(rootpath string)
func DisconnectClient ¶
func DisconnectClient() error
@URL /api/v1/disconnect/server ex. DisconnectClient()
func DisconnectRootDir ¶
func DisconnectRootDir(path string) (qstypes.DisconnectRootDirRes, error)
@URL /api/v1/disconnect/root ex. DisConnectRootDir( "/home/ubuntu/rootDir")
func ForceSyncMain ¶
func ForceSyncMain()
func FullScanMain ¶
func FullScanMain()
func GetComparelistIfNotExisted ¶
func GetComparelistIfNotExisted(comparelist []*types.ComparingSyncMetadata) []*types.ComparingSyncMetadata
GetComparelistIfNotExisted returns list of SyncMetadata which is not existed in OS
func GetConflictList ¶
@URL /api/v1/conflict/list
func GetRemoteRootList ¶
func GetRemoteRootList() (qstypes.AskRootDirRes, error)
@URL /api/v1/connect/list/remote ex. GetRemoteRootList()
func GetShareLink ¶
@URL /api/v1/share/file
func HistoryDownload ¶
@URL /api/v1/history/download
func HistoryShow ¶
func HistoryShow(path string, cntfromhead uint64) ([]qstypes.FileHistory, error)
@URL /api/v1/history/show
func InitQPClient ¶
func InitQPClient()
func InitWatcher ¶
func InitWatcher()
func NeedContentMain ¶
func NeedContentMain()
func PSwhenCreate ¶
func PSwhenRemove ¶
func PSwhenRemove(path string)
func PSwhenWrite ¶
func PSwhenWrite(path string, info os.FileInfo, syncMetadata types.SyncMetadata)
func PleaseSync ¶
func PleaseSync(path string)
func RegistRootDir ¶
@URL /api/v1/connect/root/local ex. RegistRootDir("/home/ubuntu/rootDir", "password")
func ShowStatus ¶
@URL /api/v1/sync/status ex) ShowStatus("/home/rootDir/text.txt)"
Types ¶
This section is empty.