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 Search(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 Proof
- type SearchIndexer
- type SearchProcess
- type WebdavFile
- func (this *WebdavFile) Close() error
- func (this WebdavFile) ETag(ctx context.Context) (string, error)
- func (this WebdavFile) IsDir() bool
- func (this WebdavFile) ModTime() time.Time
- func (this WebdavFile) Mode() os.FileMode
- func (this WebdavFile) Name() string
- func (this *WebdavFile) Read(p []byte) (n int, err error)
- func (this *WebdavFile) Readdir(count int) ([]os.FileInfo, error)
- func (this *WebdavFile) Seek(offset int64, whence int) (int64, error)
- func (this *WebdavFile) Size() int64
- func (this *WebdavFile) Stat() (os.FileInfo, error)
- func (this WebdavFile) Sys() interface{}
- func (this *WebdavFile) Write(p []byte) (int, error)
- type WebdavFs
- func (this WebdavFs) Mkdir(ctx context.Context, name string, perm os.FileMode) error
- func (this *WebdavFs) OpenFile(ctx context.Context, name string, flag int, perm os.FileMode) (webdav.File, error)
- func (this WebdavFs) RemoveAll(ctx context.Context, name string) error
- func (this WebdavFs) Rename(ctx context.Context, oldName, newName string) error
- func (this *WebdavFs) Stat(ctx context.Context, name string) (os.FileInfo, error)
Constants ¶
View Source
const ( PHASE_EXPLORE = "PHASE_EXPLORE" PHASE_INDEXING = "PHASE_INDEXING" PHASE_MAINTAIN = "PHASE_MAINTAIN" PHASE_PAUSE = "PHASE_PAUSE" MAX_HEAP_SIZE = 100000 )
View Source
const DAVCachePath = "data/cache/webdav/"
Variables ¶
View Source
var ( SEARCH_ENABLE func() bool SEARCH_PROCESS_MAX func() int SEARCH_PROCESS_PAR func() int SEARCH_REINDEX func() int CYCLE_TIME func() int INDEXING_EXT func() string MAX_INDEXING_FSIZE func() int INDEXING_EXCLUSION = []string{"/node_modules/", "/bower_components/", "/.cache/", "/.npm/", "/.git/"} )
View Source
var DB *sql.DB
Functions ¶
func NewBackend ¶
func NewWebdavLock ¶
func NewWebdavLock() webdav.LockSystem
func ShareDelete ¶
func ShareProofVerifierEmail ¶
func ShareUpsert ¶
func ShareUpsert(p *Share) error
func TmplEmailVerification ¶
func TmplEmailVerification() string
Types ¶
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 (this *SearchIndexer) Consolidate(tx *sql.Tx) bool
func (*SearchIndexer) Execute ¶
func (this *SearchIndexer) Execute()
type SearchProcess ¶
type SearchProcess struct {
// contains filtered or unexported fields
}
var SProc SearchProcess = SearchProcess{ // contains filtered or unexported fields }
func (*SearchProcess) HintFile ¶
func (this *SearchProcess) HintFile(app *App, path string)
func (*SearchProcess) HintLs ¶
func (this *SearchProcess) HintLs(app *App, path string) *SearchIndexer
func (*SearchProcess) HintRm ¶
func (this *SearchProcess) HintRm(app *App, path string)
func (*SearchProcess) Peek ¶
func (this *SearchProcess) Peek() *SearchIndexer
func (*SearchProcess) Reset ¶
func (this *SearchProcess) Reset()
type WebdavFile ¶
type WebdavFile struct {
// contains filtered or unexported fields
}
* Implement a webdav.File and os.Stat : https://godoc.org/golang.org/x/net/webdav#File
func (*WebdavFile) Close ¶
func (this *WebdavFile) Close() error
func (WebdavFile) IsDir ¶
func (this WebdavFile) IsDir() bool
func (WebdavFile) ModTime ¶
func (this WebdavFile) ModTime() time.Time
func (WebdavFile) Mode ¶
func (this WebdavFile) Mode() os.FileMode
func (WebdavFile) Name ¶
func (this WebdavFile) Name() string
func (*WebdavFile) Size ¶
func (this *WebdavFile) Size() int64
func (WebdavFile) Sys ¶
func (this WebdavFile) Sys() interface{}
Click to show internal directories.
Click to hide internal directories.