Documentation ¶
Index ¶
- Constants
- func Access2Mode(access types.Access) (mode uint32)
- func BuildEntryEvent(actionType string, en Entry) *types.Event
- func IsAccess(access types.Access, callerUid, callerGid int64, mask uint32) error
- func IsFileOpened(fid int64) bool
- func MatchUserGroup(callerUid, targetGid int64) bool
- func PublicEntryActionEvent(actionType string, en Entry)
- func PublicFileActionEvent(actionType string, en Entry)
- func UpdateAccessWithMode(access *types.Access, mode uint32)
- func UpdateAccessWithOwnID(access *types.Access, uid, gid int64)
- type Attr
- type CacheResetter
- type ChangeParentAttr
- type Entry
- type EntryAttr
- type File
- type Group
- type Manager
Constants ¶
View Source
const ( RootEntryID = 1 RootEntryName = "root" )
Variables ¶
This section is empty.
Functions ¶
func Access2Mode ¶
func IsFileOpened ¶
func MatchUserGroup ¶
func PublicEntryActionEvent ¶
func PublicFileActionEvent ¶
func UpdateAccessWithMode ¶
func UpdateAccessWithOwnID ¶
Types ¶
type CacheResetter ¶
type CacheResetter interface {
ResetEntry(entry Entry)
}
type ChangeParentAttr ¶
type Entry ¶
type Entry interface { Metadata() *types.Metadata GetExtendData(ctx context.Context) (types.ExtendData, error) UpdateExtendData(ctx context.Context, ed types.ExtendData) error GetExtendField(ctx context.Context, fKey string) (*string, error) SetExtendField(ctx context.Context, fKey, fVal string) error RemoveExtendField(ctx context.Context, fKey string) error IsGroup() bool IsMirror() bool Group() Group }
type Manager ¶
type Manager interface { Root(ctx context.Context) (Entry, error) GetEntry(ctx context.Context, id int64) (Entry, error) CreateEntry(ctx context.Context, parent Entry, attr EntryAttr) (Entry, error) RemoveEntry(ctx context.Context, parent, en Entry) error DestroyEntry(ctx context.Context, en Entry) error CleanEntryData(ctx context.Context, en Entry) error MirrorEntry(ctx context.Context, src, dstParent Entry, attr EntryAttr) (Entry, error) ChangeEntryParent(ctx context.Context, targetEntry, overwriteEntry, oldParent, newParent Entry, newName string, opt ChangeParentAttr) error Open(ctx context.Context, en Entry, attr Attr) (File, error) ChunkCompact(ctx context.Context, en Entry) error SetCacheResetter(r CacheResetter) MustCloseAll() }
func NewManager ¶
Click to show internal directories.
Click to hide internal directories.