community: github.com/documize/community/model/doc Index | Files

package doc

import "github.com/documize/community/model/doc"

Index

Package Files

doc.go

type ByID Uses

type ByID []Document

ByID sorts a collection of documents by document ID.

func (ByID) Len Uses

func (a ByID) Len() int

func (ByID) Less Uses

func (a ByID) Less(i, j int) bool

func (ByID) Swap Uses

func (a ByID) Swap(i, j int)

type ByName Uses

type ByName []Document

ByName sorts a collection of documents by document name.

func (ByName) Len Uses

func (a ByName) Len() int

func (ByName) Less Uses

func (a ByName) Less(i, j int) bool

func (ByName) Swap Uses

func (a ByName) Swap(i, j int)

type Document Uses

type Document struct {
    model.BaseEntity
    OrgID        string              `json:"orgId"`
    SpaceID      string              `json:"spaceId"`
    UserID       string              `json:"userId"`
    Job          string              `json:"job"`
    Location     string              `json:"location"`
    Name         string              `json:"name"`
    Excerpt      string              `json:"excerpt"`
    Slug         string              `json:"-"`
    Tags         string              `json:"tags"`
    Template     bool                `json:"template"`
    Protection   workflow.Protection `json:"protection"`
    Approval     workflow.Approval   `json:"approval"`
    Lifecycle    workflow.Lifecycle  `json:"lifecycle"`
    Versioned    bool                `json:"versioned"`
    VersionID    string              `json:"versionId"`
    VersionOrder int                 `json:"versionOrder"`
    GroupID      string              `json:"groupId"`

    // Read-only presentation only data
    Category []string `json:"category"`
}

Document represents the purpose of Documize.

func (*Document) SetDefaults Uses

func (d *Document) SetDefaults()

SetDefaults ensures on blanks and cleans.

type DocumentMeta Uses

type DocumentMeta struct {
    Viewers []DocumentMetaViewer `json:"viewers"`
    Editors []DocumentMetaEditor `json:"editors"`
}

DocumentMeta details who viewed the document.

type DocumentMetaEditor Uses

type DocumentMetaEditor struct {
    SectionID string    `json:"pageId"`
    UserID    string    `json:"userId"`
    Action    string    `json:"action"`
    Created   time.Time `json:"created"`
    Firstname string    `json:"firstname"`
    Lastname  string    `json:"lastname"`
}

DocumentMetaEditor contains the "edit" metatdata content.

type DocumentMetaViewer Uses

type DocumentMetaViewer struct {
    UserID    string    `json:"userId"`
    Created   time.Time `json:"created"`
    Firstname string    `json:"firstname"`
    Lastname  string    `json:"lastname"`
}

DocumentMetaViewer contains the "view" metatdata content.

type DuplicateModel Uses

type DuplicateModel struct {
    SpaceID    string `json:"spaceId"`
    DocumentID string `json:"documentId"`
    Name       string `json:"documentName"`
}

DuplicateModel is used to create a copy of a document.

type SitemapDocument Uses

type SitemapDocument struct {
    DocumentID string
    Document   string
    SpaceID    string
    Space      string
    Revised    time.Time
}

SitemapDocument details a document that can be exposed via Sitemap.

type UploadModel Uses

type UploadModel struct {
    JobID string `json:"jobId"`
}

UploadModel details the job ID of an uploaded document.

type Version Uses

type Version struct {
    VersionID  string             `json:"versionId"`
    DocumentID string             `json:"documentId"`
    Lifecycle  workflow.Lifecycle `json:"lifecycle"`
}

Version points to a version of a document.

Package doc imports 4 packages (graph) and is imported by 10 packages. Updated 2019-06-12. Refresh now. Tools for package owners.