Versions in this module Expand all Collapse all v0 v0.9.0 Jun 4, 2020 Changes in this version + type DocEventsHistory struct + Ctime time.Time + Data string + DocAction string + FromState string + Group string + ToState string + type DocTransitionID int64 + type Documentstruct struct + AcId int64 + Ctime time.Time + Data string + DocstateId int64 + GroupId int64 + Id int64 + Path string + Title string + type GroupRolesstruct struct + AcId int64 + GroupId int64 + Id int64 + RoleId int64 + type Permissionstruct struct + ActionId int64 + DoctypeId int64 + Id int64 + RoleId int64 + type RolePermission struct + RoleID RoleID + TypeAction typeaction + type Transitionstruct struct + DocactionId int64 + DoctypeId int64 + FromStateId int64 + Id int64 + ToStateId int64 type User + UserName string v0.8.0 Dec 15, 2017 v0.7.2 Dec 14, 2017 Changes in this version type DocAction + Reconfirm bool v0.7.1 Dec 7, 2017 v0.7.0 Dec 7, 2017 Changes in this version + const DefACRoleCount + const ErrDocEventAlreadyApplied + const ErrDocEventDocTypeMismatch + const ErrDocEventRedundant + const ErrDocEventStateMismatch + const ErrDocumentIsChild + const ErrDocumentNoParent + const ErrMessageNoRecipients + const ErrUnknown + const ErrWorkflowInactive + const ErrWorkflowInvalidAction + const NodeTypeBegin + const NodeTypeBranch + const NodeTypeEnd + const NodeTypeJoinAll + const NodeTypeJoinAny + const NodeTypeLinear + var AccessContexts _AccessContexts + var DocActions _DocActions + var DocEvents _DocEvents + var DocStates _DocStates + var DocTypes _DocTypes + var Documents _Documents + var Groups _Groups + var Mailboxes _Mailboxes + var Nodes _Nodes + var Roles _Roles + var Users _Users + var Workflows _Workflows + func IsValidNodeType(ntype string) bool + func RegisterDB(sdb *sql.DB) error + func SetBlobsDir(base string) error + type AcGroup struct + ReportsTo Group + type AcGroupRoles struct + Group string + Roles []Role + type AccessContext struct + Active bool + ID AccessContextID + Name string + func (ac *AccessContext) GroupHasPermission(id AccessContextID, gid GroupID, dtype DocTypeID, action DocActionID) (bool, error) + type AccessContextID int64 + type Blob struct + Name string + Path string + SHA1Sum string + type DocAction struct + ID DocActionID + Name string + type DocActionID int64 + type DocEvent struct + Action DocActionID + Ctime time.Time + DocID DocumentID + DocType DocTypeID + Group GroupID + ID DocEventID + State DocStateID + Status EventStatus + Text string + func (e *DocEvent) StatusInDB() (EventStatus, error) + type DocEventID int64 + type DocEventsListInput struct + CtimeBefore time.Time + CtimeStarting time.Time + Status EventStatus + type DocEventsNewInput struct + Text string + type DocPath string + func (p *DocPath) Append(dtid DocTypeID, did DocumentID) error + func (p *DocPath) Components() ([]struct{ ... }, error) + func (p *DocPath) Root() (DocTypeID, DocumentID, error) + type DocState struct + ID DocStateID + Name string + type DocStateID int64 + type DocType struct + ID DocTypeID + Name string + type DocTypeID int64 + type Document struct + AccCtx AccessContext + Ctime time.Time + Data string + DocType DocType + Group Group + ID DocumentID + Path DocPath + State DocState + Title string + type DocumentID int64 + type DocumentsListInput struct + CtimeBefore time.Time + CtimeStarting time.Time + RootOnly bool + TitleContains string + type DocumentsNewInput struct + Data string + ParentID DocumentID + ParentType DocTypeID + Title string + type Error string + func (e Error) Error() string + type EventStatus uint8 + const EventStatusAll + const EventStatusApplied + const EventStatusPending + type Group struct + GroupType string + ID GroupID + Name string + type GroupID int64 + type Mailbox struct + type Message struct + Data string + DocID DocumentID + Event DocEventID + ID MessageID + Title string + type MessageID int64 + type Node struct + AccCtx AccessContextID + DocType DocTypeID + ID NodeID + Name string + NodeType NodeType + State DocStateID + Wflow WorkflowID + func (n *Node) Func() NodeFunc + func (n *Node) SetFunc(fn NodeFunc) error + func (n *Node) Transitions() (map[DocActionID]DocStateID, error) + type NodeFunc func(*Document, *DocEvent) *Message + type NodeID int64 + type NodeType string + type Notification struct + Ctime time.Time + Unread bool + type Role struct + ID RoleID + Name string + type RoleID int64 + type Transition struct + To DocState + Upon DocAction + type TransitionMap struct + From DocState + Transitions map[DocActionID]Transition + type User struct + Active bool + Email string + FirstName string + ID UserID + LastName string + type UserID int64 + type Workflow struct + Active bool + BeginState DocState + DocType DocType + ID WorkflowID + Name string + func (w *Workflow) ApplyEvent(otx *sql.Tx, event *DocEvent, recipients []GroupID) (DocStateID, error) + type WorkflowID int64