Documentation ¶
Index ¶
- Constants
- func GetDriverFromArgs() (*Driver, *Args)
- type Args
- type AuthError
- type DoesntExistError
- type Driver
- func (this *Driver) AddGroup(contextUser identity.UserId, name string) (identity.GroupId, error)
- func (this *Driver) AddUser(contextUser identity.UserId, name string, weakhash string) (identity.UserId, error)
- func (this *Driver) ChangeGroup(userId identity.UserId, direntId dirent.Id, newGroupId identity.GroupId) error
- func (this *Driver) ChangeOwner(userId identity.UserId, direntId dirent.Id, newOwnerId identity.UserId) error
- func (this *Driver) ChangePermissions(userId identity.UserId, direntId dirent.Id, perms dirent.Permissions) error
- func (this *Driver) Close()
- func (this *Driver) ConnectionString() string
- func (this *Driver) CreateFilesystem(rootPasshash string) error
- func (this *Driver) DeleteGroup(contextUser identity.UserId, groupId identity.GroupId) error
- func (this *Driver) FetchChildByName(userId identity.UserId, parentId dirent.Id, name string) (*dirent.Dirent, error)
- func (this *Driver) GetDirent(userId identity.UserId, direntId dirent.Id) (*dirent.Dirent, error)
- func (this *Driver) GetGroups() map[identity.GroupId]*identity.Group
- func (this *Driver) GetUsers() map[identity.UserId]*identity.User
- func (this *Driver) JoinGroup(contextUser identity.UserId, targetUser identity.UserId, ...) error
- func (this *Driver) KickUser(contextUser identity.UserId, targetUser identity.UserId, ...) error
- func (this *Driver) List(userId identity.UserId, direntId dirent.Id) ([]*dirent.Dirent, error)
- func (this *Driver) MakeDir(userId identity.UserId, name string, parentId dirent.Id) (dirent.Id, error)
- func (this *Driver) Move(userId identity.UserId, targetId dirent.Id, newParentId dirent.Id) error
- func (this *Driver) PromoteUser(contextUser identity.UserId, targetUser identity.UserId, ...) error
- func (this *Driver) Put(userId identity.UserId, name string, clearbytes io.Reader, parentId dirent.Id) (dirent.Id, error)
- func (this *Driver) Read(userId identity.UserId, fileId dirent.Id) (util.ReadSeekCloser, error)
- func (this *Driver) RemoveDir(userId identity.UserId, dirId dirent.Id) error
- func (this *Driver) RemoveFile(userId identity.UserId, fileId dirent.Id) error
- func (this *Driver) RemoveUser(contextUser identity.UserId, targetId identity.UserId) error
- func (this *Driver) Rename(userId identity.UserId, targetId dirent.Id, newName string) error
- func (this *Driver) SyncFromDisk() error
- func (this *Driver) SyncToDisk(force bool) error
- func (this *Driver) UserAuth(name string, weakhash string) (*identity.User, error)
- type IllegalOperationError
- type PermissionsError
Constants ¶
View Source
const ( DEFAULT_AWS_CRED_PATH = "config/elfs-wasabi-credentials" DEFAULT_AWS_ENDPOINT = "" DEFAULT_AWS_PROFILE = "elfsapi" DEFAULT_AWS_REGION = "us-east-1" )
View Source
const ( FAT_ID = "fat" USERS_ID = "users" GROUPS_ID = "groups" SHADOW_SUFFIX = "shadow" // Offset the initial IV for each table. IV_OFFSET_USERS = 100 IV_OFFSET_GROUPS = 200 IV_OFFSET_CACHE = 300 IV_OFFSET_FAT = 500 )
Variables ¶
This section is empty.
Functions ¶
func GetDriverFromArgs ¶
This is meant to be called from a command line. This will just exit on bad args. The caller is responsible for closing the driver when done.
Types ¶
type AuthError ¶
type AuthError struct {
// contains filtered or unexported fields
}
func NewAuthError ¶
type DoesntExistError ¶
type DoesntExistError struct {
// contains filtered or unexported fields
}
func NewDoesntExistError ¶
func NewDoesntExistError(message string) *DoesntExistError
func (*DoesntExistError) Error ¶
func (this *DoesntExistError) Error() string
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
func NewLocalDriver ¶
func NewS3Driver ¶
func (*Driver) ChangeGroup ¶
func (*Driver) ChangeOwner ¶
func (*Driver) ChangePermissions ¶
func (*Driver) ConnectionString ¶
func (*Driver) CreateFilesystem ¶
Create a new filesystem.
func (*Driver) DeleteGroup ¶
func (*Driver) FetchChildByName ¶
func (*Driver) PromoteUser ¶
func (this *Driver) PromoteUser(contextUser identity.UserId, targetUser identity.UserId, groupId identity.GroupId) error
Promote a user to be the owner of a group.
func (*Driver) RemoveFile ¶
func (*Driver) RemoveUser ¶
func (*Driver) SyncFromDisk ¶
Read all the metadata from disk into memory. This should only be done once when the driver initializes.
func (*Driver) SyncToDisk ¶
Write all metadata to disk and clear the cache after.
type IllegalOperationError ¶
type IllegalOperationError struct {
// contains filtered or unexported fields
}
func NewIllegalOperationError ¶
func NewIllegalOperationError(message string) *IllegalOperationError
func (*IllegalOperationError) Error ¶
func (this *IllegalOperationError) Error() string
type PermissionsError ¶
type PermissionsError struct {
// contains filtered or unexported fields
}
func NewPermissionsError ¶
func NewPermissionsError(message string) *PermissionsError
func (*PermissionsError) Error ¶
func (this *PermissionsError) Error() string
Click to show internal directories.
Click to hide internal directories.