Documentation ¶
Index ¶
- Constants
- Variables
- func CanEdit(ctx *App) bool
- func CanRead(ctx *App) bool
- func CanShare(ctx *App) bool
- func CanUpload(ctx *App) bool
- func GetHome(b IBackend, base string) (string, error)
- func MapStringInterfaceToMapStringString(m map[string]interface{}) map[string]string
- func NewBackend(ctx *App, conn map[string]string) (IBackend, error)
- func NewWebdavLock() webdav.LockSystem
- func SearchStateLess(app *App, path string, keyword string) []File
- func SearchStateful(app *App, path string, keyword string) []File
- func ShareDelete(id string) error
- func ShareGet(id string) (Share, error)
- func ShareList(backend string, path string) ([]Share, error)
- func ShareProofVerifierEmail(users string, wanted string) (string, bool)
- func ShareProofVerifierPassword(hashed string, given string) (string, bool)
- func ShareUpsert(p *Share) error
- func TmplEmailVerification() string
- type Document
- type HeapDoc
- type PathQuandidate
- type Proof
- type SearchIndexer
- type SearchProcess
- type WebdavFile
- func (f *WebdavFile) Close() error
- func (f WebdavFile) ETag(ctx context.Context) (string, error)
- func (f WebdavFile) IsDir() bool
- func (f WebdavFile) ModTime() time.Time
- func (f WebdavFile) Mode() os.FileMode
- func (f WebdavFile) Name() string
- func (f *WebdavFile) Read(p []byte) (n int, err error)
- func (f *WebdavFile) Readdir(count int) ([]os.FileInfo, error)
- func (f *WebdavFile) Seek(offset int64, whence int) (int64, error)
- func (f *WebdavFile) Size() int64
- func (f *WebdavFile) Stat() (os.FileInfo, error)
- func (f WebdavFile) Sys() interface{}
- func (f *WebdavFile) Write(p []byte) (int, error)
- type WebdavFs
- func (f WebdavFs) Mkdir(ctx context.Context, name string, perm os.FileMode) error
- func (f *WebdavFs) OpenFile(ctx context.Context, name string, flag int, perm os.FileMode) (webdav.File, error)
- func (f WebdavFs) RemoveAll(ctx context.Context, name string) error
- func (f WebdavFs) Rename(ctx context.Context, oldName, newName string) error
- func (f *WebdavFs) Stat(ctx context.Context, name string) (os.FileInfo, error)
Constants ¶
View Source
const ( PhaseExplore = "PHASE_EXPLORE" PhaseIndexing = "PHASE_INDEXING" PhaseMaintain = "PHASE_MAINTAIN" PhasePause = "PHASE_PAUSE" MaxHeapSize = 100000 )
View Source
const DAVCachePath = "data/cache/webdav/"
Variables ¶
View Source
var ( SearchEnable func() bool SearchTimeout func() time.Duration SearchProcessMax func() int SearchProcessPar func() int SearchReindex func() int CycleTime func() int IndexingExt func() string MaxIndexingFsize func() int IndexingExclusion = []string{"/node_modules/", "/bower_components/", "/.cache/", "/.npm/", "/.git/"} )
View Source
var DB *sql.DB
View Source
var SProc = SearchProcess{ // contains filtered or unexported fields }
Functions ¶
func NewBackend ¶
func NewWebdavLock ¶
func NewWebdavLock() webdav.LockSystem
func SearchStateLess ¶
func SearchStateful ¶
func ShareDelete ¶
func ShareProofVerifierEmail ¶
func ShareUpsert ¶
func ShareUpsert(p *Share) error
func TmplEmailVerification ¶
func TmplEmailVerification() string
Types ¶
type PathQuandidate ¶
type Proof ¶
type Proof struct { Id string `json:"id"` Key string `json:"key"` Value string `json:"-"` Message *string `json:"message,omitempty"` Error *string `json:"error,omitempty"` }
func ShareProofGetRequired ¶
func ShareProofGetRequired(s Share) []Proof
func ShareProofVerifier ¶
type SearchIndexer ¶
type SearchIndexer struct { Id string FoldersUnknown HeapDoc CurrentPhase string Backend IBackend DBPath string DB *sql.DB // contains filtered or unexported fields }
func NewSearchIndexer ¶
func NewSearchIndexer(id string, b IBackend) SearchIndexer
func (*SearchIndexer) Consolidate ¶
func (s *SearchIndexer) Consolidate(tx *sql.Tx) bool
func (*SearchIndexer) Execute ¶
func (s *SearchIndexer) Execute()
type SearchProcess ¶
type SearchProcess struct {
// contains filtered or unexported fields
}
func (*SearchProcess) HintFile ¶
func (p *SearchProcess) HintFile(app *App, path string)
func (*SearchProcess) HintLs ¶
func (p *SearchProcess) HintLs(app *App, path string) *SearchIndexer
func (*SearchProcess) HintRm ¶
func (p *SearchProcess) HintRm(app *App, path string)
func (*SearchProcess) Peek ¶
func (p *SearchProcess) Peek() *SearchIndexer
func (*SearchProcess) Reset ¶
func (p *SearchProcess) Reset()
type WebdavFile ¶
type WebdavFile struct {
// contains filtered or unexported fields
}
WebdavFile Implement a webdav.File and os.Stat : https://godoc.org/golang.org/x/net/webdav#File
func (*WebdavFile) Close ¶
func (f *WebdavFile) Close() error
func (WebdavFile) IsDir ¶
func (f WebdavFile) IsDir() bool
func (WebdavFile) ModTime ¶
func (f WebdavFile) ModTime() time.Time
func (WebdavFile) Mode ¶
func (f WebdavFile) Mode() os.FileMode
func (WebdavFile) Name ¶
func (f WebdavFile) Name() string
func (*WebdavFile) Size ¶
func (f *WebdavFile) Size() int64
func (WebdavFile) Sys ¶
func (f WebdavFile) Sys() interface{}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.