Documentation
¶
Index ¶
- Variables
- func NewSystem(store Store) webdav.LockSystem
- type LockNode
- type MemoryStore
- type Store
- type System
- func (s *System) Confirm(now time.Time, name0, name1 string, conditions ...webdav.Condition) (func(), error)
- func (s *System) Create(now time.Time, details webdav.LockDetails) (string, error)
- func (s *System) Refresh(now time.Time, token string, duration time.Duration) (webdav.LockDetails, error)
- func (s *System) Unlock(now time.Time, token string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrLockNotFound = errors.New("lock not found")
)
Functions ¶
Types ¶
type MemoryStore ¶
type MemoryStore struct {
// contains filtered or unexported fields
}
func NewMemoryStore ¶
func NewMemoryStore() *MemoryStore
func (*MemoryStore) ApplyLock ¶
func (m *MemoryStore) ApplyLock(node *LockNode, paths ...string) error
ApplyLock implements Store.
func (*MemoryStore) GetLock ¶
func (m *MemoryStore) GetLock(token string) (*LockNode, error)
GetLock implements Store.
func (*MemoryStore) GetLocksByPath ¶
func (m *MemoryStore) GetLocksByPath(path string) ([]*LockNode, error)
GetLocksByPath implements Store.
func (*MemoryStore) RemoveLock ¶
func (m *MemoryStore) RemoveLock(token string) error
RemoveLock implements Store.
type System ¶
type System struct {
// contains filtered or unexported fields
}
System implements webdav.LockSystem. It is safe for concurrent use by multiple goroutines.
func (*System) Confirm ¶
func (s *System) Confirm(now time.Time, name0, name1 string, conditions ...webdav.Condition) (func(), error)
Confirm verifies that the given conditions allow access to the named resource. It returns a release function if the access is granted.
Click to show internal directories.
Click to hide internal directories.