Documentation ¶
Overview ¶
Package fs implements an in-memory user store backed by a virtual filesystem.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func NewStore ¶
func NewStore(root webdav.FileSystem) (*Store, error)
NewStore creates an in-memory user store backed by a virtual filesystem root for storage.
func (*Store) Create ¶
Create creates the specified user. UserSpec must specify a valid (i.e., non-zero) user. It returns os.ErrExist if the user already exists.
func (*Store) InsertByCanonicalMe ¶
InsertByCanonicalMe inserts a user identified by the CanonicalMe field into the user store. If a user with the same CanonicalMe value doesn't exist yet, a new user is created. Otherwise, the existing user is updated. CanonicalMe must not be empty.
The user ID must be 0 and domain must be non-empty. The returned user keeps the same domain and gets assigned a unique persistent non-zero ID.