activity

package
v2.4.1+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 26, 2019 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TypeName added in v1.56.0

func TypeName(t Type) string

TypeName returns one-work descriptor for activity type

Types

type DocumentActivity

type DocumentActivity struct {
	ID           uint64    `json:"id"`
	OrgID        string    `json:"orgId"`
	SpaceID      string    `json:"spaceId"`
	DocumentID   string    `json:"documentId"`
	SectionID    string    `json:"pageId"`
	SectionName  string    `json:"pageTitle"`
	UserID       string    `json:"userId"`
	Firstname    string    `json:"firstname"`
	Lastname     string    `json:"lastname"`
	ActivityType int       `json:"activityType"`
	Metadata     string    `json:"metadata"`
	Created      time.Time `json:"created"`
}

DocumentActivity represents an activity taken against a document.

type SourceType

type SourceType int

SourceType details where the activity occured.

const (
	// SourceTypeSpace indicates activity against a space.
	SourceTypeSpace SourceType = 1

	// SourceTypeDocument indicates activity against a document.
	SourceTypeDocument SourceType = 2

	// SourceTypePage indicates activity against a document page.
	SourceTypePage SourceType = 3

	// SourceTypeSearch indicates activity on search page.
	SourceTypeSearch SourceType = 4
)

type Type

type Type int

Type determines type of user activity

const (
	// TypeCreated records user object creation (document or space).
	TypeCreated Type = 1

	// TypeRead states user has consumed object (document or space).
	TypeRead Type = 2

	// TypeEdited states user has editing document.
	TypeEdited Type = 3

	// TypeDeleted records user deleting space/document.
	TypeDeleted Type = 4

	// TypeArchived records user archiving space/document.
	TypeArchived Type = 5

	// TypeApproved records user approval of document.
	TypeApproved Type = 6

	// TypeReverted records user content roll-back to previous document version.
	TypeReverted Type = 7

	// TypePublishedTemplate records user creating new document template.
	TypePublishedTemplate Type = 8

	// TypePublishedBlock records user creating reusable content block.
	TypePublishedBlock Type = 9

	// TypeCommented records user providing document feedback.
	TypeCommented Type = 10

	// TypeRejected records user rejecting document.
	TypeRejected Type = 11

	// TypeSentSecureLink records user sending secure document link via email.
	TypeSentSecureLink Type = 12

	// TypeDraft records user marking space/document as draft.
	TypeDraft Type = 13

	// TypeVersioned records user creating new document version.
	TypeVersioned Type = 14

	// TypeSearched records user performing document keyword search.
	// Metadata field should contain search terms.
	TypeSearched Type = 15

	// TypePublished happens when a document is moved from Draft to Live.
	TypePublished Type = 16
)

type UserActivity

type UserActivity struct {
	ID           uint64     `json:"id"`
	OrgID        string     `json:"orgId"`
	UserID       string     `json:"userId"`
	SpaceID      string     `json:"spaceId"`
	DocumentID   string     `json:"documentId"`
	SectionID    string     `json:"pageId"`
	ActivityType Type       `json:"activityType"`
	SourceType   SourceType `json:"sourceType"`
	Metadata     string     `json:"metadata"`
	Created      time.Time  `json:"created"`

	// Read-only outbound fields (e.g. for UI display)
	SourceName string `json:"sourceName"`
}

UserActivity represents an activity undertaken by a user.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL