Versions in this module Expand all Collapse all v0 v0.4.1 Mar 30, 2019 v0.4.0 Mar 19, 2019 Changes in this version + func AuthMiddleware(s *State) func(http.Handler) http.Handler + func SecureMiddleware(s *State) func(http.Handler) http.Handler + type AllDirsHandler struct + func NewAllDirsHandler(s *State) *AllDirsHandler + func (ah *AllDirsHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) + type AllDirsResponse struct + Paths []string + Success bool + type Commit struct + Date int64 + Hash string + Index int64 + Msg string + Tags []string + type CopyHandler struct + func NewCopyHandler(s *State) *CopyHandler + func (ch *CopyHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) + type CopyRequest struct + Destination string + Source string + type DeletedPathsHandler struct + func NewDeletedPathsHandler(s *State) *DeletedPathsHandler + func (dh *DeletedPathsHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) + type DeletedPathsResponse struct + Entries []*StatInfo + Success bool + type DeletedRequest struct + Filter string + Limit int64 + Offset int64 + type Diff struct + Added []*StatInfo + Conflict []DiffPair + Ignored []*StatInfo + Merged []DiffPair + Missing []*StatInfo + Moved []DiffPair + Removed []*StatInfo + type DiffPair struct + Dst *StatInfo + Src *StatInfo + type EventsHandler struct + func NewEventsHandler(rapi remotesapi.RemotesAPI, ev *events.Listener) *EventsHandler + func (eh *EventsHandler) Notify(ctx context.Context, msg string) error + func (eh *EventsHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) + func (eh *EventsHandler) Shutdown() + type GetHandler struct + func NewGetHandler(s *State) *GetHandler + func (gh *GetHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) + type HistoryEntry struct + Change string + Head Commit + IsExplicit bool + IsPinned bool + Path string + type HistoryHandler struct + func NewHistoryHandler(s *State) *HistoryHandler + func (hh *HistoryHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) + type HistoryRequest struct + Path string + type HistoryResponse struct + Entries []HistoryEntry + Success bool + type IndexHandler struct + func NewIndexHandler(s *State) *IndexHandler + func (ih *IndexHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) + type LogHandler struct + func NewLogHandler(s *State) *LogHandler + func (lh *LogHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) + type LogRequest struct + Filter string + Limit int64 + Offset int64 + type LogResponse struct + Commits []Commit + HaveStagedChanges bool + Success bool + type LoginHandler struct + func NewLoginHandler(s *State) *LoginHandler + func (lih *LoginHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) + type LoginRequest struct + Password string + Username string + type LoginResponse struct + AnonIsAllowed bool + IsAnon bool + Rights []string + Success bool + Username string + type LogoutHandler struct + func NewLogoutHandler(s *State) *LogoutHandler + func (loh *LogoutHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) + type LsHandler struct + func NewLsHandler(s *State) *LsHandler + func (lh *LsHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) + type LsRequest struct + Filter string + Root string + type LsResponse struct + Files []*StatInfo + IsFiltered bool + Self *StatInfo + Success bool + type MkdirHandler struct + func NewMkdirHandler(s *State) *MkdirHandler + func (mh *MkdirHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) + type MkdirRequest struct + Path string + type MoveHandler struct + func NewMoveHandler(s *State) *MoveHandler + func (mh *MoveHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) + type MoveRequest struct + Destination string + Source string + type PinHandler struct + func NewPinHandler(s *State) *PinHandler + func NewUnpinHandler(s *State) *PinHandler + func (ph *PinHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) + type PinRequest struct + DoPin bool + Path string + Revision string + type PingHandler struct + func NewPingHandler(s *State) *PingHandler + func (wh *PingHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) + type PingResponse struct + IsOnline bool + type RedirHandler struct + func NewHTTPRedirectHandler(redirPort int64) *RedirHandler + func (rh *RedirHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) + type RemoteAddRequest struct + AcceptAutoUpdates bool + AcceptPush bool + ConflictStrategy string + Fingerprint string + Folders []remotesapi.Folder + Name string + type RemoteDiffRequest struct + Name string + type RemoteDiffResponse struct + Diff *Diff + Success bool + type RemoteListHandler struct + func NewRemotesListHandler(s *State) *RemoteListHandler + func (rh *RemoteListHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) + type RemoteListResponse struct + Remotes []*remotesapi.Remote + Success bool + type RemoteRemoveRequest struct + Name string + type RemoteSelfHandler struct + func NewRemotesSelfHandler(s *State) *RemoteSelfHandler + func (rh *RemoteSelfHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) + type RemoteSelfResponse struct + DefaultConflictStrategy string + Self remotesapi.Identity + Success bool + type RemoteSyncRequest struct + Name string + type RemotesAddHandler struct + func NewRemotesAddHandler(s *State) *RemotesAddHandler + func (rh *RemotesAddHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) + type RemotesDiffHandler struct + func NewRemotesDiffHandler(s *State) *RemotesDiffHandler + func (rh *RemotesDiffHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) + type RemotesModifyHandler struct + func NewRemotesModifyHandler(s *State) *RemotesModifyHandler + func (rh *RemotesModifyHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) + type RemotesRemoveHandler struct + func NewRemotesRemoveHandler(s *State) *RemotesRemoveHandler + func (rh *RemotesRemoveHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) + type RemotesSyncHandler struct + func NewRemotesSyncHandler(s *State) *RemotesSyncHandler + func (rh *RemotesSyncHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) + type RemoveHandler struct + func NewRemoveHandler(s *State) *RemoveHandler + func (rh *RemoveHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) + type RemoveRequest struct + Paths []string + type ResetHandler struct + func NewResetHandler(s *State) *ResetHandler + func (rh *ResetHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) + type ResetRequest struct + Force bool + Path string + Revision string + type StatInfo struct + Depth int + Inode uint64 + IsDir bool + IsExplicit bool + IsPinned bool + ModTime int64 + Path string + Size uint64 + User string + type State struct + func NewState(fs *catfs.FS, rapi remotesapi.RemotesAPI, cfg *config.Config, ...) (*State, error) + func (s *State) Close() error + func (s *State) UserDatabase() *db.UserDatabase + type UndeleteHandler struct + func NewUndeleteHandler(s *State) *UndeleteHandler + func (uh *UndeleteHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) + type UndeleteRequest struct + Path string + type UploadHandler struct + func NewUploadHandler(s *State) *UploadHandler + func (uh *UploadHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) + type WhoamiHandler struct + func NewWhoamiHandler(s *State) *WhoamiHandler + func (wh *WhoamiHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) + type WhoamiResponse struct + AnonIsAllowed bool + IsAnon bool + IsLoggedIn bool + Rights []string + User string