Versions in this module Expand all Collapse all v0 v0.4.0 Jan 19, 2024 Changes in this version + func GetStringSliceValue(in map[string]any, key string) ([]string, error) + func GetStringValue(in map[string]any, key string) (string, error) + type CustomDocTypeField struct + DisplayName string + Type string + type CustomField struct + DisplayName string + Name string + Type string + Value any + type Document struct + AppCreated bool + ApprovedBy []string + Approvers []string + ChangesRequestedBy []string + Content string + Contributors []string + Created string + CreatedTime int64 + CustomEditableFields map[string]CustomDocTypeField + CustomFields []CustomField + DocNumber string + DocType string + FileRevisions map[string]string + LinkedDocs []string + Locked bool + MetaTags []string + ModifiedTime int64 + ObjectID string + OwnerPhotos []string + Owners []string + Product string + Status string + Summary string + Tags []string + ThumbnailLink string + Title string + func NewFromAlgoliaObject(in map[string]any, docTypes []*config.DocumentType) (*Document, error) + func NewFromDatabaseModel(model models.Document, reviews models.DocumentReviews) (*Document, error) + func (d *Document) DeleteFileRevision(revisionID string) + func (d *Document) SetFileRevision(revisionID, revisionName string) + func (d *Document) UpsertCustomField(cf CustomField) error + func (d Document) ToAlgoliaObject(removeCustomEditableFields bool) (map[string]any, error) + func (d Document) ToDatabaseModels(docTypes []*config.DocumentType, products []*config.Product) (models.Document, models.DocumentReviews, error) + func (doc *Document) ReplaceHeader(baseURL string, isDraft bool, s *gw.Service) error