Documentation
¶
Index ¶
- Constants
- func Access2Mode(access types.Access) (mode uint32)
- func BuildEntryEvent(actionType string, entry *types.Metadata) *types.EntryEvent
- func IsAccess(access types.Access, callerUid, callerGid int64, mask uint32) error
- func IsFileOpened(fid int64) bool
- func MatchUserGroup(callerUid, targetGid int64) bool
- func UpdateAccessWithMode(access *types.Access, mode uint32)
- func UpdateAccessWithOwnID(access *types.Access, uid, gid int64)
- type File
- type Group
- type Manager
Constants ¶
View Source
const ( RootEntryID = 1 RootEntryName = "root" )
Variables ¶
This section is empty.
Functions ¶
func Access2Mode ¶
func BuildEntryEvent ¶
func BuildEntryEvent(actionType string, entry *types.Metadata) *types.EntryEvent
func IsFileOpened ¶
func MatchUserGroup ¶
func UpdateAccessWithMode ¶
func UpdateAccessWithOwnID ¶
Types ¶
type Group ¶
type Group interface {
FindEntry(ctx context.Context, name string) (*types.Metadata, error)
CreateEntry(ctx context.Context, attr types.EntryAttr) (*types.Metadata, error)
UpdateEntry(ctx context.Context, entry *types.Metadata) error
RemoveEntry(ctx context.Context, entryID int64) error
ListChildren(ctx context.Context) ([]*types.Metadata, error)
}
type Manager ¶
type Manager interface {
Root(ctx context.Context) (*types.Metadata, error)
GetEntry(ctx context.Context, id int64) (*types.Metadata, error)
GetEntryByUri(ctx context.Context, uri string) (*types.Metadata, error)
CreateEntry(ctx context.Context, parentId int64, attr types.EntryAttr) (*types.Metadata, error)
RemoveEntry(ctx context.Context, parentId, entryId int64) error
DestroyEntry(ctx context.Context, entryId int64) error
CleanEntryData(ctx context.Context, entryId int64) error
MirrorEntry(ctx context.Context, srcId, dstParentId int64, attr types.EntryAttr) (*types.Metadata, error)
ChangeEntryParent(ctx context.Context, targetEntryId int64, overwriteEntryId *int64, oldParentId, newParentId int64, newName string, opt types.ChangeParentAttr) error
GetEntryExtendData(ctx context.Context, id int64) (types.ExtendData, error)
UpdateEntryExtendData(ctx context.Context, id int64, ed types.ExtendData) error
GetEntryExtendField(ctx context.Context, id int64, fKey string) (*string, bool, error)
SetEntryExtendField(ctx context.Context, id int64, fKey, fVal string, encoded bool) error
RemoveEntryExtendField(ctx context.Context, id int64, fKey string) error
GetEntryLabels(ctx context.Context, id int64) (types.Labels, error)
UpdateEntryLabels(ctx context.Context, id int64, labels types.Labels) error
Open(ctx context.Context, entryId int64, attr types.OpenAttr) (File, error)
OpenGroup(ctx context.Context, entryID int64) (Group, error)
ChunkCompact(ctx context.Context, entryId int64) error
MustCloseAll()
}
Click to show internal directories.
Click to hide internal directories.