Documentation ¶
Index ¶
- Constants
- Variables
- func IsGroup(k Kind) bool
- func IsMirrored(entry *Metadata) bool
- func KindMap(k Kind) int64
- type Access
- type ChangeParentAttr
- type ChunkSeg
- type DestroyObjectAttr
- type Document
- type DocumentFeed
- type EntryAttr
- type EntryEvent
- type EntryUri
- type EventData
- type ExtendData
- type FDocument
- type FeedResult
- type FeedResultItem
- type Filter
- type FridayAccount
- type JobFilter
- type Kind
- type Label
- type LabelMatch
- type Labels
- type Metadata
- type Notification
- type OpenAttr
- type Permission
- type PlugScope
- type PluginSpec
- type PluginType
- type Properties
- type PropertyItem
- type Rule
- type ScheduledTask
- type ScheduledTaskFilter
- type SystemInfo
- type WorkflowEntryResult
- type WorkflowJob
- type WorkflowJobStep
- type WorkflowSpec
- type WorkflowStepSpec
- type WorkflowTarget
Constants ¶
View Source
const ( PermOwnerRead = "owner_read" PermOwnerWrite = "owner_write" PermOwnerExec = "owner_exec" PermGroupRead = "group_read" PermGroupWrite = "group_write" PermGroupExec = "group_exec" PermOthersRead = "others_read" PermOthersWrite = "others_write" PermOthersExec = "others_exec" PermSetUid = "set_uid" PermSetGid = "set_gid" PermSticky = "sticky" )
View Source
const ( ScheduledTaskInitial = "initial" ScheduledTaskWait = "wait" ScheduledTaskExecuting = "executing" ScheduledTaskFinish = "finish" ScheduledTaskSucceed = "succeed" ScheduledTaskFailed = "failed" )
View Source
const ( NotificationInfo = "info" NotificationWarn = "warn" NotificationUnread = "unread" NotificationRead = "read" )
View Source
const ( /* system-wide kind */ GroupKind = "group" SmartGroupKind = "smtgroup" ExternalGroupKind = "extgroup" GroupKindMap = 0x02000 SmartGroupKindMap = 0x02001 ExternalGroupKindMap = 0x02002 /* text based file kind */ TextKind = "text" TextKindMap = 0x01001 /* format doc kind */ FmtDocKind = "fmtdoc" FmtDocKindMap = 0x01002 /* media file kind */ ImageKind = "image" VideoKind = "video" AudioKind = "audio" ImageKindMap = 0x01003 VideoKindMap = 0x01004 AudioKindMap = 0x01005 /* web based file kind */ WebArchiveKind = "web" WebArchiveKindMap = 0x01006 /* ungrouped files */ RawKind = "raw" RawKindMap = 0x01000 FIFOKind = "fifo" SocketKind = "socket" SymLinkKind = "symlink" BlkDevKind = "blk" CharDevKind = "chr" FIFOKindMap = 0x03001 SocketKindMap = 0x03002 SymLinkKindMap = 0x03003 BlkDevKindMap = 0x03004 CharDevKindMap = 0x03005 )
View Source
const ( LabelKeyPluginPrefix = "org.basenana.internal.plugin/" LabelKeyPluginKind = LabelKeyPluginPrefix + "kind" LabelKeyPluginName = LabelKeyPluginPrefix + "name" )
View Source
const ( PlugScopeEntryName = "entry.name" PlugScopeEntryPath = "entry.path" // relative path PlugScopeWorkflowID = "workflow.id" PlugScopeWorkflowJobID = "workflow.job.id" )
View Source
const ( RuleLogicAll = "all" RuleLogicAny = "any" RuleLogicNot = "not" RuleOpEqual = "equal" RuleOpBeginWith = "prefix" RuleOpEndWith = "suffix" RuleOpPattern = "pattern" RuleOpBefore = "before" RuleOpAfter = "after" RuleOpIn = "in" )
Variables ¶
View Source
var ( ErrNotFound = errors.New("no record") ErrNameTooLong = errors.New("name too long") ErrIsExist = errors.New("record existed") ErrNotEmpty = errors.New("group not empty") ErrNoGroup = errors.New("not group") ErrIsGroup = errors.New("this object is a group") ErrNoAccess = errors.New("no access") ErrNoPerm = errors.New("no permission") ErrConflict = errors.New("operation conflict") ErrUnsupported = errors.New("unsupported operation") )
Functions ¶
func IsMirrored ¶
Types ¶
type Access ¶
type Access struct { Permissions []Permission `json:"permissions,omitempty"` UID int64 `json:"uid"` GID int64 `json:"gid"` }
func (*Access) AddPerm ¶
func (a *Access) AddPerm(p Permission)
func (*Access) HasPerm ¶
func (a *Access) HasPerm(p Permission) bool
func (*Access) RemovePerm ¶
func (a *Access) RemovePerm(p Permission)
type ChangeParentAttr ¶
type DestroyObjectAttr ¶
type Document ¶
type Document struct { ID int64 `json:"id"` OID int64 `json:"oid"` Name string `json:"name"` ParentEntryID int64 `json:"parent_entry_id"` Source string `json:"source"` KeyWords []string `json:"keywords,omitempty"` Content string `json:"content,omitempty"` Summary string `json:"summary,omitempty"` Desync bool `json:"desync"` CreatedAt time.Time `json:"created_at"` ChangedAt time.Time `json:"changed_at"` }
type DocumentFeed ¶
type EntryEvent ¶
type EntryEvent struct { Id string `json:"id"` Type string `json:"type"` Source string `json:"source"` SpecVersion string `json:"specversion"` Time time.Time `json:"time"` RefID int64 `json:"nanafsrefid"` RefType string `json:"nanafsreftype"` DataContentType string `json:"datacontenttype"` Data EventData `json:"data"` }
type EventData ¶
type EventData struct { ID int64 `json:"id"` ParentID int64 `json:"parent_id,omitempty"` RefID int64 `json:"ref_id,omitempty"` Kind Kind `json:"kind,omitempty"` KindMap int64 `json:"kind_map,omitempty"` Namespace string `json:"namespace,omitempty"` Storage string `json:"storage,omitempty"` }
func NewEventDataFromEntry ¶
type ExtendData ¶
type ExtendData struct { Properties Properties `json:"properties"` Symlink string `json:"symlink,omitempty"` GroupFilter *Rule `json:"group_filter,omitempty"` PlugScope *PlugScope `json:"plug_scope,omitempty"` }
type FeedResult ¶
type FeedResultItem ¶
type FridayAccount ¶
type LabelMatch ¶
type Metadata ¶
type Metadata struct { ID int64 `json:"id"` Name string `json:"name"` Aliases string `json:"aliases,omitempty"` ParentID int64 `json:"parent_id"` RefID int64 `json:"ref_id,omitempty"` RefCount int `json:"ref_count,omitempty"` Kind Kind `json:"kind"` KindMap int64 `json:"kind_map"` Size int64 `json:"size"` Version int64 `json:"version"` Dev int64 `json:"dev"` Namespace string `json:"namespace,omitempty"` Storage string `json:"storage"` CreatedAt time.Time `json:"created_at"` ChangedAt time.Time `json:"changed_at"` ModifiedAt time.Time `json:"modified_at"` AccessAt time.Time `json:"access_at"` Access Access `json:"access"` }
func NewMetadata ¶
type Notification ¶
type Permission ¶
type Permission string
type PluginSpec ¶
type PluginSpec struct { Name string `json:"name"` Version string `json:"version"` Type PluginType `json:"type"` Parameters map[string]string `json:"parameters"` Adaptor string `json:"adaptor"` Path string `json:"path,omitempty"` // goplugin Operator string `json:"operator,omitempty"` // goflow }
PluginSpec is Plugin Config File to load a Plugin
type PluginType ¶
type PluginType string
const ( TypeSource PluginType = "source" TypeProcess PluginType = "process" TypeMirror PluginType = "mirror" TypeIngest PluginType = "ingest" )
type Properties ¶
type Properties struct {
Fields map[string]PropertyItem `json:"fields,omitempty"`
}
type PropertyItem ¶
type ScheduledTask ¶
type ScheduledTaskFilter ¶
type SystemInfo ¶
type WorkflowEntryResult ¶
type WorkflowEntryResult struct { }
type WorkflowJob ¶
type WorkflowJob struct { Id string `json:"id"` Workflow string `json:"workflow"` TriggerReason string `json:"trigger_reason,omitempty"` Target WorkflowTarget `json:"target"` Steps []WorkflowJobStep `json:"steps"` Status string `json:"status,omitempty"` Message string `json:"message,omitempty"` StartAt time.Time `json:"start_at"` FinishAt time.Time `json:"finish_at"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
func (*WorkflowJob) GetMessage ¶
func (w *WorkflowJob) GetMessage() string
func (*WorkflowJob) GetStatus ¶
func (w *WorkflowJob) GetStatus() string
func (*WorkflowJob) SetMessage ¶
func (w *WorkflowJob) SetMessage(msg string)
func (*WorkflowJob) SetStatus ¶
func (w *WorkflowJob) SetStatus(status string)
type WorkflowJobStep ¶
type WorkflowSpec ¶
type WorkflowSpec struct { Id string `json:"id"` Name string `json:"name"` Rule Rule `json:"rule,omitempty"` Cron string `json:"cron,omitempty"` Steps []WorkflowStepSpec `json:"steps,omitempty"` Enable bool `json:"enable"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` LastTriggeredAt time.Time `json:"last_triggered_at"` }
type WorkflowStepSpec ¶
type WorkflowTarget ¶
Click to show internal directories.
Click to hide internal directories.