Documentation ¶
Index ¶
- Constants
- func AdvancedCheckListToNoteText(cl AdvancedChecklist) string
- func DecryptContent(e EncryptedItem, encryptionKey string) (content []byte, err error)
- func DecryptEncryptedItemKey(e EncryptedItem, encryptionKey string) (itemKey []byte, err error)
- func DeleteContent(session *session.Session, everything bool) (deleted int, err error)
- func GenUUID() string
- func GetMatchingItem(uuid string, iks []session.SessionItemsKey) session.SessionItemsKey
- func IsEncryptedType(ct string) bool
- func IsEncryptedWithMasterKey(t string) bool
- func TasksToNoteText(tasks Tasks) string
- type AdvancedChecklist
- func (c *AdvancedChecklist) AddGroup(groupName string) error
- func (c *AdvancedChecklist) AddTask(groupName, taskTitle string) error
- func (c *AdvancedChecklist) CompleteTask(groupName, taskTitle string) error
- func (c *AdvancedChecklist) DeleteGroup(groupName string) error
- func (c *AdvancedChecklist) DeleteTask(groupName, taskTitle string) error
- func (c *AdvancedChecklist) GetGroup(title string) (AdvancedChecklistGroup, bool)
- func (c *AdvancedChecklist) ReopenTask(groupName, taskTitle string) error
- func (c *AdvancedChecklist) Sort()
- type AdvancedChecklistGroup
- type AdvancedChecklistSection
- type AdvancedChecklistTask
- type AdvancedChecklistTasks
- type AdvancedChecklists
- type AppDataContent
- type AppTagConfig
- type AuthData
- type CompareEncryptedItemsInput
- type CompareItemsInput
- type Component
- func (c Component) GetContent() Content
- func (c Component) GetContentSize() int
- func (c Component) GetContentType() string
- func (c Component) GetCreatedAt() string
- func (c Component) GetCreatedAtTimestamp() int64
- func (c Component) GetDuplicateOf() string
- func (c Component) GetItemsKeyID() string
- func (c Component) GetUUID() string
- func (c Component) GetUpdatedAt() string
- func (c Component) GetUpdatedAtTimestamp() int64
- func (c Component) IsDefault() bool
- func (c Component) IsDeleted() bool
- func (c *Component) SetContent(cc Content)
- func (c *Component) SetContentSize(s int)
- func (c *Component) SetContentType(ct string)
- func (c *Component) SetCreatedAt(ca string)
- func (c *Component) SetCreatedAtTimestamp(ca int64)
- func (c *Component) SetDeleted(d bool)
- func (c *Component) SetUUID(u string)
- func (c *Component) SetUpdatedAt(ca string)
- func (c *Component) SetUpdatedAtTimestamp(ca int64)
- type ComponentContent
- func (cc *ComponentContent) AssociateItems(newItems []string)
- func (cc *ComponentContent) DisassociateItems(itemsToRemove []string)
- func (cc *ComponentContent) GetActive() bool
- func (cc *ComponentContent) GetAppData() AppDataContent
- func (cc *ComponentContent) GetItemAssociations() []string
- func (cc *ComponentContent) GetItemDisassociations() []string
- func (cc *ComponentContent) GetName() string
- func (cc ComponentContent) GetTitle() string
- func (cc *ComponentContent) GetUpdateTime() (time.Time, error)
- func (cc ComponentContent) References() ItemReferences
- func (cc *ComponentContent) SetAppData(data AppDataContent)
- func (cc *ComponentContent) SetReferences(input ItemReferences)
- func (cc *ComponentContent) SetTitle(title string)
- func (cc *ComponentContent) SetUpdateTime(uTime time.Time)
- func (cc *ComponentContent) UpsertReferences(input ItemReferences)
- type Components
- type ConflictedItem
- type ConflictedItems
- type Content
- type DecryptedItem
- type DecryptedItems
- type DefaultSection
- type EIT
- type EncItemKey
- type EncryptedItem
- func EncryptItem(item Item, ik session.SessionItemsKey, session *session.Session) (encryptedItem EncryptedItem, err error)
- func EncryptItemsKey(ik session.SessionItemsKey, s *session.Session, new bool) (encryptedItem EncryptedItem, err error)
- func ReEncryptItem(ei EncryptedItem, decryptionItemsKey session.SessionItemsKey, ...) (o EncryptedItem, err error)
- type EncryptedItemExport
- type EncryptedItems
- func (ei *EncryptedItems) DeDupe()
- func (ei EncryptedItems) DecryptAndParse(s *session.Session) (o Items, err error)
- func (ei EncryptedItems) DecryptAndParseItemsKeys(mk string, debug bool) (o []session.SessionItemsKey, err error)
- func (ei EncryptedItems) ReEncrypt(s *session.Session, decryptionItemsKey session.SessionItemsKey, ...) (o EncryptedItems, err error)
- func (ei *EncryptedItems) RemoveDeleted()
- func (ei *EncryptedItems) RemoveUnsupported()
- func (ei *EncryptedItems) Validate() error
- type EncryptedItemsFile
- type Extension
- func (c Extension) GetContent() Content
- func (c Extension) GetContentSize() int
- func (c Extension) GetContentType() string
- func (c Extension) GetCreatedAt() string
- func (c Extension) GetCreatedAtTimestamp() int64
- func (c Extension) GetDuplicateOf() string
- func (c Extension) GetItemsKeyID() string
- func (c Extension) GetUUID() string
- func (c Extension) GetUpdatedAt() string
- func (c Extension) GetUpdatedAtTimestamp() int64
- func (c Extension) IsDefault() bool
- func (c Extension) IsDeleted() bool
- func (c *Extension) SetContent(cc Content)
- func (c *Extension) SetContentSize(s int)
- func (c *Extension) SetContentType(ct string)
- func (c *Extension) SetCreatedAt(ca string)
- func (c *Extension) SetCreatedAtTimestamp(ca int64)
- func (c *Extension) SetDeleted(d bool)
- func (c *Extension) SetUUID(u string)
- func (c *Extension) SetUpdatedAt(ca string)
- func (c *Extension) SetUpdatedAtTimestamp(ca int64)
- type ExtensionContent
- func (cc *ExtensionContent) AssociateItems(newItems []string)
- func (cc *ExtensionContent) DisassociateItems(itemsToRemove []string)
- func (cc *ExtensionContent) GetActive() bool
- func (cc *ExtensionContent) GetAppData() AppDataContent
- func (cc *ExtensionContent) GetItemAssociations() []string
- func (cc *ExtensionContent) GetItemDisassociations() []string
- func (cc *ExtensionContent) GetName() string
- func (cc ExtensionContent) GetTitle() string
- func (cc *ExtensionContent) GetUpdateTime() (time.Time, error)
- func (cc ExtensionContent) References() ItemReferences
- func (cc *ExtensionContent) SetAppData(data AppDataContent)
- func (cc *ExtensionContent) SetReferences(input ItemReferences)
- func (cc *ExtensionContent) SetTitle(title string)
- func (cc *ExtensionContent) SetUpdateTime(uTime time.Time)
- func (cc *ExtensionContent) UpsertReferences(input ItemReferences)
- type ExtensionRepo
- func (c ExtensionRepo) GetContent() Content
- func (c ExtensionRepo) GetContentSize() int
- func (c ExtensionRepo) GetContentType() string
- func (c ExtensionRepo) GetCreatedAt() string
- func (c ExtensionRepo) GetCreatedAtTimestamp() int64
- func (c ExtensionRepo) GetDuplicateOf() string
- func (c ExtensionRepo) GetItemsKeyID() string
- func (c ExtensionRepo) GetUUID() string
- func (c ExtensionRepo) GetUpdatedAt() string
- func (c ExtensionRepo) GetUpdatedAtTimestamp() int64
- func (c ExtensionRepo) IsDefault() bool
- func (c ExtensionRepo) IsDeleted() bool
- func (c *ExtensionRepo) SetContent(cc Content)
- func (c *ExtensionRepo) SetContentSize(s int)
- func (c *ExtensionRepo) SetContentType(ct string)
- func (c *ExtensionRepo) SetCreatedAt(ca string)
- func (c *ExtensionRepo) SetCreatedAtTimestamp(ca int64)
- func (c *ExtensionRepo) SetDeleted(d bool)
- func (c *ExtensionRepo) SetUUID(u string)
- func (c *ExtensionRepo) SetUpdatedAt(ca string)
- func (c *ExtensionRepo) SetUpdatedAtTimestamp(ca int64)
- type ExtensionRepoContent
- func (cc *ExtensionRepoContent) AssociateItems(newItems []string)
- func (cc *ExtensionRepoContent) DisassociateItems(itemsToRemove []string)
- func (cc *ExtensionRepoContent) GetActive() bool
- func (cc *ExtensionRepoContent) GetAppData() AppDataContent
- func (cc *ExtensionRepoContent) GetItemAssociations() []string
- func (cc *ExtensionRepoContent) GetItemDisassociations() []string
- func (cc *ExtensionRepoContent) GetName() string
- func (cc ExtensionRepoContent) GetTitle() string
- func (cc *ExtensionRepoContent) GetUpdateTime() (time.Time, error)
- func (cc ExtensionRepoContent) References() ItemReferences
- func (cc *ExtensionRepoContent) SetAppData(data AppDataContent)
- func (cc *ExtensionRepoContent) SetReferences(input ItemReferences)
- func (cc *ExtensionRepoContent) SetTitle(title string)
- func (cc *ExtensionRepoContent) SetUpdateTime(uTime time.Time)
- func (cc *ExtensionRepoContent) UpsertReferences(input ItemReferences)
- type ExtensionRepos
- type Extensions
- type File
- func (c File) GetContent() Content
- func (c File) GetContentSize() int
- func (c File) GetContentType() string
- func (c File) GetCreatedAt() string
- func (c File) GetCreatedAtTimestamp() int64
- func (c File) GetDuplicateOf() string
- func (c File) GetItemsKeyID() string
- func (c File) GetUUID() string
- func (c File) GetUpdatedAt() string
- func (c File) GetUpdatedAtTimestamp() int64
- func (c File) IsDefault() bool
- func (c File) IsDeleted() bool
- func (c *File) SetContent(cc Content)
- func (c *File) SetContentSize(s int)
- func (c *File) SetContentType(ct string)
- func (c *File) SetCreatedAt(ca string)
- func (c *File) SetCreatedAtTimestamp(ca int64)
- func (c *File) SetDeleted(d bool)
- func (c *File) SetUUID(u string)
- func (c *File) SetUpdatedAt(ca string)
- func (c *File) SetUpdatedAtTimestamp(ca int64)
- type FileContent
- func (cc *FileContent) AssociateItems(newItems []string)
- func (cc *FileContent) DisassociateItems(itemsToRemove []string)
- func (cc *FileContent) GetActive() bool
- func (cc *FileContent) GetAppData() AppDataContent
- func (cc *FileContent) GetItemAssociations() []string
- func (cc *FileContent) GetItemDisassociations() []string
- func (cc *FileContent) GetName() string
- func (cc FileContent) GetTitle() string
- func (cc *FileContent) GetUpdateTime() (time.Time, error)
- func (cc FileContent) References() ItemReferences
- func (cc *FileContent) SetAppData(data AppDataContent)
- func (cc *FileContent) SetReferences(input ItemReferences)
- func (cc *FileContent) SetTitle(title string)
- func (cc *FileContent) SetUpdateTime(uTime time.Time)
- func (cc *FileContent) UpsertReferences(input ItemReferences)
- type FileSafeCredentials
- func (c FileSafeCredentials) GetContent() Content
- func (c FileSafeCredentials) GetContentSize() int
- func (c FileSafeCredentials) GetContentType() string
- func (c FileSafeCredentials) GetCreatedAt() string
- func (c FileSafeCredentials) GetCreatedAtTimestamp() int64
- func (c FileSafeCredentials) GetDuplicateOf() string
- func (c FileSafeCredentials) GetItemsKeyID() string
- func (c FileSafeCredentials) GetUUID() string
- func (c FileSafeCredentials) GetUpdatedAt() string
- func (c FileSafeCredentials) GetUpdatedAtTimestamp() int64
- func (c FileSafeCredentials) IsDefault() bool
- func (c FileSafeCredentials) IsDeleted() bool
- func (c *FileSafeCredentials) SetContent(cc Content)
- func (c *FileSafeCredentials) SetContentSize(s int)
- func (c *FileSafeCredentials) SetContentType(ct string)
- func (c *FileSafeCredentials) SetCreatedAt(ca string)
- func (c *FileSafeCredentials) SetCreatedAtTimestamp(ca int64)
- func (c *FileSafeCredentials) SetDeleted(d bool)
- func (c *FileSafeCredentials) SetUUID(u string)
- func (c *FileSafeCredentials) SetUpdatedAt(ca string)
- func (c *FileSafeCredentials) SetUpdatedAtTimestamp(ca int64)
- type FileSafeCredentialsContent
- func (cc *FileSafeCredentialsContent) AssociateItems(newItems []string)
- func (cc *FileSafeCredentialsContent) DisassociateItems(itemsToRemove []string)
- func (cc *FileSafeCredentialsContent) GetActive() bool
- func (cc *FileSafeCredentialsContent) GetAppData() AppDataContent
- func (cc *FileSafeCredentialsContent) GetItemAssociations() []string
- func (cc *FileSafeCredentialsContent) GetItemDisassociations() []string
- func (cc *FileSafeCredentialsContent) GetName() string
- func (cc FileSafeCredentialsContent) GetTitle() string
- func (cc *FileSafeCredentialsContent) GetUpdateTime() (time.Time, error)
- func (cc FileSafeCredentialsContent) References() ItemReferences
- func (cc *FileSafeCredentialsContent) SetAppData(data AppDataContent)
- func (cc *FileSafeCredentialsContent) SetReferences(input ItemReferences)
- func (cc *FileSafeCredentialsContent) SetTitle(title string)
- func (cc *FileSafeCredentialsContent) SetUpdateTime(uTime time.Time)
- func (cc *FileSafeCredentialsContent) UpsertReferences(input ItemReferences)
- type FileSafeCredentialss
- type FileSafeFileMetaData
- func (c FileSafeFileMetaData) GetContent() Content
- func (c FileSafeFileMetaData) GetContentSize() int
- func (c FileSafeFileMetaData) GetContentType() string
- func (c FileSafeFileMetaData) GetCreatedAt() string
- func (c FileSafeFileMetaData) GetCreatedAtTimestamp() int64
- func (c FileSafeFileMetaData) GetDuplicateOf() string
- func (c FileSafeFileMetaData) GetItemsKeyID() string
- func (c FileSafeFileMetaData) GetUUID() string
- func (c FileSafeFileMetaData) GetUpdatedAt() string
- func (c FileSafeFileMetaData) GetUpdatedAtTimestamp() int64
- func (c FileSafeFileMetaData) IsDefault() bool
- func (c FileSafeFileMetaData) IsDeleted() bool
- func (c *FileSafeFileMetaData) SetContent(cc Content)
- func (c *FileSafeFileMetaData) SetContentSize(s int)
- func (c *FileSafeFileMetaData) SetContentType(ct string)
- func (c *FileSafeFileMetaData) SetCreatedAt(ca string)
- func (c *FileSafeFileMetaData) SetCreatedAtTimestamp(ca int64)
- func (c *FileSafeFileMetaData) SetDeleted(d bool)
- func (c *FileSafeFileMetaData) SetUUID(u string)
- func (c *FileSafeFileMetaData) SetUpdatedAt(ca string)
- func (c *FileSafeFileMetaData) SetUpdatedAtTimestamp(ca int64)
- type FileSafeFileMetaDataContent
- func (cc *FileSafeFileMetaDataContent) AssociateItems(newItems []string)
- func (cc *FileSafeFileMetaDataContent) DisassociateItems(itemsToRemove []string)
- func (cc *FileSafeFileMetaDataContent) GetActive() bool
- func (cc *FileSafeFileMetaDataContent) GetAppData() AppDataContent
- func (cc *FileSafeFileMetaDataContent) GetItemAssociations() []string
- func (cc *FileSafeFileMetaDataContent) GetItemDisassociations() []string
- func (cc *FileSafeFileMetaDataContent) GetName() string
- func (cc FileSafeFileMetaDataContent) GetTitle() string
- func (cc *FileSafeFileMetaDataContent) GetUpdateTime() (time.Time, error)
- func (cc FileSafeFileMetaDataContent) References() ItemReferences
- func (cc *FileSafeFileMetaDataContent) SetAppData(data AppDataContent)
- func (cc *FileSafeFileMetaDataContent) SetReferences(input ItemReferences)
- func (cc *FileSafeFileMetaDataContent) SetTitle(title string)
- func (cc *FileSafeFileMetaDataContent) SetUpdateTime(uTime time.Time)
- func (cc *FileSafeFileMetaDataContent) UpsertReferences(input ItemReferences)
- type FileSafeFileMetaDatas
- type FileSafeIntegration
- func (c FileSafeIntegration) GetContent() Content
- func (c FileSafeIntegration) GetContentSize() int
- func (c FileSafeIntegration) GetContentType() string
- func (c FileSafeIntegration) GetCreatedAt() string
- func (c FileSafeIntegration) GetCreatedAtTimestamp() int64
- func (c FileSafeIntegration) GetDuplicateOf() string
- func (c FileSafeIntegration) GetItemsKeyID() string
- func (c FileSafeIntegration) GetUUID() string
- func (c FileSafeIntegration) GetUpdatedAt() string
- func (c FileSafeIntegration) GetUpdatedAtTimestamp() int64
- func (c FileSafeIntegration) IsDefault() bool
- func (c FileSafeIntegration) IsDeleted() bool
- func (c *FileSafeIntegration) SetContent(cc Content)
- func (c *FileSafeIntegration) SetContentSize(s int)
- func (c *FileSafeIntegration) SetContentType(ct string)
- func (c *FileSafeIntegration) SetCreatedAt(ca string)
- func (c *FileSafeIntegration) SetCreatedAtTimestamp(ca int64)
- func (c *FileSafeIntegration) SetDeleted(d bool)
- func (c *FileSafeIntegration) SetUUID(u string)
- func (c *FileSafeIntegration) SetUpdatedAt(ca string)
- func (c *FileSafeIntegration) SetUpdatedAtTimestamp(ca int64)
- type FileSafeIntegrationContent
- func (cc *FileSafeIntegrationContent) AssociateItems(newItems []string)
- func (cc *FileSafeIntegrationContent) DisassociateItems(itemsToRemove []string)
- func (cc *FileSafeIntegrationContent) GetActive() bool
- func (cc *FileSafeIntegrationContent) GetAppData() AppDataContent
- func (cc *FileSafeIntegrationContent) GetItemAssociations() []string
- func (cc *FileSafeIntegrationContent) GetItemDisassociations() []string
- func (cc *FileSafeIntegrationContent) GetName() string
- func (cc FileSafeIntegrationContent) GetTitle() string
- func (cc *FileSafeIntegrationContent) GetUpdateTime() (time.Time, error)
- func (cc FileSafeIntegrationContent) References() ItemReferences
- func (cc *FileSafeIntegrationContent) SetAppData(data AppDataContent)
- func (cc *FileSafeIntegrationContent) SetReferences(input ItemReferences)
- func (cc *FileSafeIntegrationContent) SetTitle(title string)
- func (cc *FileSafeIntegrationContent) SetUpdateTime(uTime time.Time)
- func (cc *FileSafeIntegrationContent) UpsertReferences(input ItemReferences)
- type FileSafeIntegrations
- type Files
- type Filter
- type Item
- type ItemCommon
- type ItemFilters
- type ItemReference
- type ItemReferences
- type Items
- func (i *Items) Append(x []interface{})
- func (i Items) Components() (c Components)
- func (i *Items) DeDupe()
- func (i *Items) Encrypt(s *session.Session, ik session.SessionItemsKey) (e EncryptedItems, err error)
- func (i Items) Extension() (c Extensions)
- func (i Items) ExtensionRepo() (c ExtensionRepos)
- func (i Items) File() (c Files)
- func (i Items) FileSafeCredentials() (c FileSafeCredentialss)
- func (i Items) FileSafeFileMetaData() (c FileSafeFileMetaDatas)
- func (i Items) FileSafeIntegration() (c FileSafeIntegrations)
- func (i *Items) Filter(f ItemFilters)
- func (i *Items) FilterAllTypes(f ItemFilters)
- func (i Items) Notes() (n Notes)
- func (i Items) Privileges() (c PrivilegesN)
- func (i *Items) RemoveDeleted()
- func (i Items) SFExtension() (c SFExtensions)
- func (i Items) SFMFA() (c SFMFAs)
- func (i Items) SmartTag() (c SmartTags)
- func (i Items) Tags() (t Tags)
- func (i Items) Themes() (c Themes)
- func (i Items) UUIDs() []string
- func (i Items) UserPreferences() (c UserPreferencess)
- func (i Items) Validate(session *session.Session) error
- type ItemsKey
- type ItemsKeyContent
- type ItemsKeyEncKey
- type ItemsKeys
- type Note
- func (n Note) Copy() Note
- func (n Note) Equals(e Note) bool
- func (n Note) GetContent() Content
- func (n Note) GetContentSize() int
- func (n Note) GetContentType() string
- func (n Note) GetCreatedAt() string
- func (n Note) GetCreatedAtTimestamp() int64
- func (c Note) GetDuplicateOf() string
- func (n Note) GetItemsKeyID() string
- func (n Note) GetUUID() string
- func (n Note) GetUpdatedAt() string
- func (n Note) GetUpdatedAtTimestamp() int64
- func (n Note) IsDefault() bool
- func (n Note) IsDeleted() bool
- func (n *Note) SetContent(c Content)
- func (n *Note) SetContentSize(s int)
- func (n *Note) SetContentType(ct string)
- func (n *Note) SetCreatedAt(ca string)
- func (n *Note) SetCreatedAtTimestamp(ca int64)
- func (n *Note) SetDeleted(d bool)
- func (n *Note) SetUUID(u string)
- func (n *Note) SetUpdatedAt(ca string)
- func (n *Note) SetUpdatedAtTimestamp(ca int64)
- type NoteAppDataContent
- type NoteContent
- func (noteContent *NoteContent) AddItemAssociations() string
- func (noteContent *NoteContent) AssociateItems(newItems []string)
- func (noteContent NoteContent) Copy() NoteContent
- func (noteContent *NoteContent) DisassociateItems(newItems []string)
- func (noteContent *NoteContent) GetActive() bool
- func (noteContent *NoteContent) GetAppData() NoteAppDataContent
- func (noteContent *NoteContent) GetItemAssociations() []string
- func (noteContent *NoteContent) GetItemDisassociations() []string
- func (noteContent *NoteContent) GetName() string
- func (noteContent NoteContent) GetPrefersPlainEditor() bool
- func (noteContent NoteContent) GetText() string
- func (noteContent NoteContent) GetTitle() string
- func (noteContent *NoteContent) GetTrashed() bool
- func (noteContent *NoteContent) GetUpdateTime() (time.Time, error)
- func (noteContent NoteContent) MarshalJSON() ([]byte, error)
- func (noteContent NoteContent) References() ItemReferences
- func (noteContent *NoteContent) SetAppData(data NoteAppDataContent)
- func (noteContent *NoteContent) SetPrefersPlainEditor(p bool)
- func (noteContent *NoteContent) SetReferences(newRefs ItemReferences)
- func (noteContent *NoteContent) SetText(text string)
- func (noteContent *NoteContent) SetTitle(title string)
- func (noteContent *NoteContent) SetTrashed(t bool)
- func (noteContent *NoteContent) SetUpdateTime(uTime time.Time)
- func (noteContent NoteContent) ToAdvancedCheckList() (AdvancedChecklist, error)
- func (noteContent NoteContent) ToTaskList() (Tasklist, error)
- func (noteContent *NoteContent) UpsertReferences(newRefs ItemReferences)
- type Notes
- type OrgStandardNotesSNComponentsDetail
- type OrgStandardNotesSNDetail
- type Privileges
- func (c Privileges) GetContent() Content
- func (c Privileges) GetContentSize() int
- func (c Privileges) GetContentType() string
- func (c Privileges) GetCreatedAt() string
- func (c Privileges) GetCreatedAtTimestamp() int64
- func (c Privileges) GetDuplicateOf() string
- func (c Privileges) GetItemsKeyID() string
- func (c Privileges) GetUUID() string
- func (c Privileges) GetUpdatedAt() string
- func (c Privileges) GetUpdatedAtTimestamp() int64
- func (c Privileges) IsDefault() bool
- func (c Privileges) IsDeleted() bool
- func (c *Privileges) SetContent(cc Content)
- func (c *Privileges) SetContentSize(s int)
- func (c *Privileges) SetContentType(ct string)
- func (c *Privileges) SetCreatedAt(ca string)
- func (c *Privileges) SetCreatedAtTimestamp(ca int64)
- func (c *Privileges) SetDeleted(d bool)
- func (c *Privileges) SetUUID(u string)
- func (c *Privileges) SetUpdatedAt(ca string)
- func (c *Privileges) SetUpdatedAtTimestamp(ca int64)
- type PrivilegesContent
- func (cc *PrivilegesContent) AssociateItems(newItems []string)
- func (cc *PrivilegesContent) DisassociateItems(itemsToRemove []string)
- func (cc *PrivilegesContent) GetActive() bool
- func (cc *PrivilegesContent) GetAppData() AppDataContent
- func (cc *PrivilegesContent) GetItemAssociations() []string
- func (cc *PrivilegesContent) GetItemDisassociations() []string
- func (cc *PrivilegesContent) GetName() string
- func (cc PrivilegesContent) GetTitle() string
- func (cc *PrivilegesContent) GetUpdateTime() (time.Time, error)
- func (cc PrivilegesContent) References() ItemReferences
- func (cc *PrivilegesContent) SetAppData(data AppDataContent)
- func (cc *PrivilegesContent) SetReferences(input ItemReferences)
- func (cc *PrivilegesContent) SetTitle(title string)
- func (cc *PrivilegesContent) SetUpdateTime(uTime time.Time)
- func (cc *PrivilegesContent) UpsertReferences(input ItemReferences)
- type PrivilegesN
- type SFExtension
- func (c SFExtension) GetContent() Content
- func (c SFExtension) GetContentSize() int
- func (c SFExtension) GetContentType() string
- func (c SFExtension) GetCreatedAt() string
- func (c SFExtension) GetCreatedAtTimestamp() int64
- func (c SFExtension) GetDuplicateOf() string
- func (c SFExtension) GetItemsKeyID() string
- func (c SFExtension) GetUUID() string
- func (c SFExtension) GetUpdatedAt() string
- func (c SFExtension) GetUpdatedAtTimestamp() int64
- func (c SFExtension) IsDefault() bool
- func (c SFExtension) IsDeleted() bool
- func (c *SFExtension) SetContent(cc Content)
- func (c *SFExtension) SetContentSize(s int)
- func (c *SFExtension) SetContentType(ct string)
- func (c *SFExtension) SetCreatedAt(ca string)
- func (c *SFExtension) SetCreatedAtTimestamp(ca int64)
- func (c *SFExtension) SetDeleted(d bool)
- func (c *SFExtension) SetUUID(u string)
- func (c *SFExtension) SetUpdatedAt(ca string)
- func (c *SFExtension) SetUpdatedAtTimestamp(ca int64)
- type SFExtensionContent
- func (cc *SFExtensionContent) AssociateItems(newItems []string)
- func (cc *SFExtensionContent) DisassociateItems(itemsToRemove []string)
- func (cc *SFExtensionContent) GetActive() bool
- func (cc *SFExtensionContent) GetAppData() AppDataContent
- func (cc *SFExtensionContent) GetItemAssociations() []string
- func (cc *SFExtensionContent) GetItemDisassociations() []string
- func (cc *SFExtensionContent) GetName() string
- func (cc SFExtensionContent) GetTitle() string
- func (cc *SFExtensionContent) GetUpdateTime() (time.Time, error)
- func (cc SFExtensionContent) References() ItemReferences
- func (cc *SFExtensionContent) SetAppData(data AppDataContent)
- func (cc *SFExtensionContent) SetReferences(input ItemReferences)
- func (cc *SFExtensionContent) SetTitle(title string)
- func (cc *SFExtensionContent) SetUpdateTime(uTime time.Time)
- func (cc *SFExtensionContent) UpsertReferences(input ItemReferences)
- type SFExtensions
- type SFMFA
- func (c SFMFA) GetContent() Content
- func (c SFMFA) GetContentSize() int
- func (c SFMFA) GetContentType() string
- func (c SFMFA) GetCreatedAt() string
- func (c SFMFA) GetCreatedAtTimestamp() int64
- func (c SFMFA) GetDuplicateOf() string
- func (c SFMFA) GetItemsKeyID() string
- func (c SFMFA) GetUUID() string
- func (c SFMFA) GetUpdatedAt() string
- func (c SFMFA) GetUpdatedAtTimestamp() int64
- func (c SFMFA) IsDefault() bool
- func (c SFMFA) IsDeleted() bool
- func (c *SFMFA) SetContent(cc Content)
- func (c *SFMFA) SetContentSize(s int)
- func (c *SFMFA) SetContentType(ct string)
- func (c *SFMFA) SetCreatedAt(ca string)
- func (c *SFMFA) SetCreatedAtTimestamp(ca int64)
- func (c *SFMFA) SetDeleted(d bool)
- func (c *SFMFA) SetUUID(u string)
- func (c *SFMFA) SetUpdatedAt(ca string)
- func (c *SFMFA) SetUpdatedAtTimestamp(ca int64)
- type SFMFAContent
- func (cc *SFMFAContent) AssociateItems(newItems []string)
- func (cc *SFMFAContent) DisassociateItems(itemsToRemove []string)
- func (cc *SFMFAContent) GetActive() bool
- func (cc *SFMFAContent) GetAppData() AppDataContent
- func (cc *SFMFAContent) GetItemAssociations() []string
- func (cc *SFMFAContent) GetItemDisassociations() []string
- func (cc *SFMFAContent) GetName() string
- func (cc SFMFAContent) GetTitle() string
- func (cc *SFMFAContent) GetUpdateTime() (time.Time, error)
- func (cc SFMFAContent) References() ItemReferences
- func (cc *SFMFAContent) SetAppData(data AppDataContent)
- func (cc *SFMFAContent) SetReferences(input ItemReferences)
- func (cc *SFMFAContent) SetTitle(title string)
- func (cc *SFMFAContent) SetUpdateTime(uTime time.Time)
- func (cc *SFMFAContent) UpsertReferences(input ItemReferences)
- type SFMFAs
- type SmartTag
- func (c SmartTag) GetContent() Content
- func (c SmartTag) GetContentSize() int
- func (c SmartTag) GetContentType() string
- func (c SmartTag) GetCreatedAt() string
- func (c SmartTag) GetCreatedAtTimestamp() int64
- func (c SmartTag) GetDuplicateOf() string
- func (c SmartTag) GetItemsKeyID() string
- func (c SmartTag) GetUUID() string
- func (c SmartTag) GetUpdatedAt() string
- func (c SmartTag) GetUpdatedAtTimestamp() int64
- func (c SmartTag) IsDefault() bool
- func (c SmartTag) IsDeleted() bool
- func (c *SmartTag) SetContent(cc Content)
- func (c *SmartTag) SetContentSize(s int)
- func (c *SmartTag) SetContentType(ct string)
- func (c *SmartTag) SetCreatedAt(ca string)
- func (c *SmartTag) SetCreatedAtTimestamp(ca int64)
- func (c *SmartTag) SetDeleted(d bool)
- func (c *SmartTag) SetUUID(u string)
- func (c *SmartTag) SetUpdatedAt(ca string)
- func (c *SmartTag) SetUpdatedAtTimestamp(ca int64)
- type SmartTagContent
- func (cc *SmartTagContent) AssociateItems(newItems []string)
- func (cc *SmartTagContent) DisassociateItems(itemsToRemove []string)
- func (cc *SmartTagContent) GetActive() bool
- func (cc *SmartTagContent) GetAppData() AppDataContent
- func (cc *SmartTagContent) GetItemAssociations() []string
- func (cc *SmartTagContent) GetItemDisassociations() []string
- func (cc *SmartTagContent) GetName() string
- func (cc SmartTagContent) GetTitle() string
- func (cc *SmartTagContent) GetUpdateTime() (time.Time, error)
- func (cc SmartTagContent) References() ItemReferences
- func (cc *SmartTagContent) SetAppData(data AppDataContent)
- func (cc *SmartTagContent) SetReferences(input ItemReferences)
- func (cc *SmartTagContent) SetTitle(title string)
- func (cc *SmartTagContent) SetUpdateTime(uTime time.Time)
- func (cc *SmartTagContent) UpsertReferences(input ItemReferences)
- type SmartTags
- type SyncInput
- type SyncOutput
- type Tag
- func (t Tag) Copy() Tag
- func (t Tag) Equals(e Tag) bool
- func (t Tag) GetContent() Content
- func (t Tag) GetContentSize() int
- func (t Tag) GetContentType() string
- func (t Tag) GetCreatedAt() string
- func (t Tag) GetCreatedAtTimestamp() int64
- func (c Tag) GetDuplicateOf() string
- func (t Tag) GetItemsKeyID() string
- func (t Tag) GetUUID() string
- func (t Tag) GetUpdatedAt() string
- func (t Tag) GetUpdatedAtTimestamp() int64
- func (t Tag) IsDefault() bool
- func (t Tag) IsDeleted() bool
- func (t *Tag) SetContent(c Content)
- func (t *Tag) SetContentSize(s int)
- func (t *Tag) SetContentType(ct string)
- func (t *Tag) SetCreatedAt(ca string)
- func (t *Tag) SetCreatedAtTimestamp(ca int64)
- func (t *Tag) SetDeleted(d bool)
- func (t *Tag) SetUUID(u string)
- func (t *Tag) SetUpdatedAt(ca string)
- func (t *Tag) SetUpdatedAtTimestamp(ca int64)
- type TagContent
- func (tagContent *TagContent) AssociateItems(newItems []string)
- func (tagContent TagContent) Copy() TagContent
- func (tagContent *TagContent) DisassociateItems(newItems []string)
- func (tagContent TagContent) Equals(e TagContent) bool
- func (tagContent *TagContent) GetActive() bool
- func (tagContent *TagContent) GetAppData() AppDataContent
- func (tagContent *TagContent) GetItemAssociations() []string
- func (tagContent *TagContent) GetItemDisassociations() []string
- func (tagContent *TagContent) GetName() string
- func (tagContent TagContent) GetText() string
- func (tagContent TagContent) GetTitle() string
- func (tagContent *TagContent) GetUpdateTime() (time.Time, error)
- func (tagContent TagContent) MarshalJSON() ([]byte, error)
- func (tagContent TagContent) References() ItemReferences
- func (tagContent *TagContent) SetAppData(data AppDataContent)
- func (tagContent *TagContent) SetReferences(newRefs ItemReferences)
- func (tagContent *TagContent) SetText(text string)
- func (tagContent *TagContent) SetTitle(title string)
- func (tagContent *TagContent) SetUpdateTime(uTime time.Time)
- func (tagContent *TagContent) TextContains(findString string, matchCase bool) bool
- func (tagContent *TagContent) UpsertReferences(newRefs ItemReferences)
- type Tags
- type Task
- type Tasklist
- type Tasklists
- type Tasks
- type Theme
- func (c Theme) GetContent() Content
- func (c Theme) GetContentSize() int
- func (c Theme) GetContentType() string
- func (c Theme) GetCreatedAt() string
- func (c Theme) GetCreatedAtTimestamp() int64
- func (c Theme) GetDuplicateOf() string
- func (c Theme) GetItemsKeyID() string
- func (c Theme) GetUUID() string
- func (c Theme) GetUpdatedAt() string
- func (c Theme) GetUpdatedAtTimestamp() int64
- func (c Theme) IsDefault() bool
- func (c Theme) IsDeleted() bool
- func (c *Theme) SetContent(cc Content)
- func (c *Theme) SetContentSize(s int)
- func (c *Theme) SetContentType(ct string)
- func (c *Theme) SetCreatedAt(ca string)
- func (c *Theme) SetCreatedAtTimestamp(ca int64)
- func (c *Theme) SetDeleted(d bool)
- func (c *Theme) SetUUID(u string)
- func (c *Theme) SetUpdatedAt(ca string)
- func (c *Theme) SetUpdatedAtTimestamp(ca int64)
- type ThemeContent
- func (cc *ThemeContent) AssociateItems(newItems []string)
- func (cc *ThemeContent) DisassociateItems(itemsToRemove []string)
- func (cc *ThemeContent) GetActive() bool
- func (cc *ThemeContent) GetAppData() AppDataContent
- func (cc *ThemeContent) GetItemAssociations() []string
- func (cc *ThemeContent) GetItemDisassociations() []string
- func (cc *ThemeContent) GetName() string
- func (cc ThemeContent) GetTitle() string
- func (cc *ThemeContent) GetUpdateTime() (time.Time, error)
- func (cc ThemeContent) References() ItemReferences
- func (cc *ThemeContent) SetAppData(data AppDataContent)
- func (cc *ThemeContent) SetReferences(input ItemReferences)
- func (cc *ThemeContent) SetTitle(title string)
- func (cc *ThemeContent) SetUpdateTime(uTime time.Time)
- func (cc *ThemeContent) UpsertReferences(input ItemReferences)
- type Themes
- type UpdateItemRefsInput
- type UpdateItemRefsOutput
- type UserPreferences
- func (c UserPreferences) GetContent() Content
- func (c UserPreferences) GetContentSize() int
- func (c UserPreferences) GetContentType() string
- func (c UserPreferences) GetCreatedAt() string
- func (c UserPreferences) GetCreatedAtTimestamp() int64
- func (c UserPreferences) GetDuplicateOf() string
- func (c UserPreferences) GetItemsKeyID() string
- func (c UserPreferences) GetUUID() string
- func (c UserPreferences) GetUpdatedAt() string
- func (c UserPreferences) GetUpdatedAtTimestamp() int64
- func (c UserPreferences) IsDefault() bool
- func (c UserPreferences) IsDeleted() bool
- func (c *UserPreferences) SetContent(cc Content)
- func (c *UserPreferences) SetContentSize(s int)
- func (c *UserPreferences) SetContentType(ct string)
- func (c *UserPreferences) SetCreatedAt(ca string)
- func (c *UserPreferences) SetCreatedAtTimestamp(ca int64)
- func (c *UserPreferences) SetDeleted(d bool)
- func (c *UserPreferences) SetUUID(u string)
- func (c *UserPreferences) SetUpdatedAt(ca string)
- func (c *UserPreferences) SetUpdatedAtTimestamp(ca int64)
- type UserPreferencesContent
- func (cc *UserPreferencesContent) AssociateItems(newItems []string)
- func (cc *UserPreferencesContent) DisassociateItems(itemsToRemove []string)
- func (cc *UserPreferencesContent) GetActive() bool
- func (cc *UserPreferencesContent) GetAppData() AppDataContent
- func (cc *UserPreferencesContent) GetItemAssociations() []string
- func (cc *UserPreferencesContent) GetItemDisassociations() []string
- func (cc *UserPreferencesContent) GetName() string
- func (cc UserPreferencesContent) GetTitle() string
- func (cc *UserPreferencesContent) GetUpdateTime() (time.Time, error)
- func (cc UserPreferencesContent) References() ItemReferences
- func (cc *UserPreferencesContent) SetAppData(data AppDataContent)
- func (cc *UserPreferencesContent) SetReferences(input ItemReferences)
- func (cc *UserPreferencesContent) SetTitle(title string)
- func (cc *UserPreferencesContent) SetUpdateTime(uTime time.Time)
- func (cc *UserPreferencesContent) UpsertReferences(input ItemReferences)
- type UserPreferencess
Constants ¶
const (
AdvancedChecklistNoteType = "com.sncommunity.advanced-checklist"
)
const (
SimpleTaskEditorNoteType = "org.standardnotes.simple-task-editor"
)
Variables ¶
This section is empty.
Functions ¶
func AdvancedCheckListToNoteText ¶
func AdvancedCheckListToNoteText(cl AdvancedChecklist) string
func DecryptContent ¶
func DecryptContent(e EncryptedItem, encryptionKey string) (content []byte, err error)
func DecryptEncryptedItemKey ¶
func DecryptEncryptedItemKey(e EncryptedItem, encryptionKey string) (itemKey []byte, err error)
func DeleteContent ¶
DeleteContent will remove all Notes, Tags, and Components from SN.
func GenUUID ¶
func GenUUID() string
GenUUID generates a unique identifier required when creating a new item.
func GetMatchingItem ¶
func GetMatchingItem(uuid string, iks []session.SessionItemsKey) session.SessionItemsKey
func IsEncryptedType ¶
func TasksToNoteText ¶
Types ¶
type AdvancedChecklist ¶
type AdvancedChecklist struct { UUID string `json:"-"` Duplicates []AdvancedChecklist `json:"-"` Title string `json:"-"` SchemaVersion string `json:"schemaVersion"` Groups []AdvancedChecklistGroup `json:"groups"` DefaultSections []DefaultSection `json:"defaultSections"` UpdatedAt time.Time `json:"updatedAt"` Trashed bool `json:"trashed"` }
func NoteTextToAdvancedChecklist ¶
func NoteTextToAdvancedChecklist(text string, quoted bool) (cl AdvancedChecklist, err error)
func (*AdvancedChecklist) AddGroup ¶
func (c *AdvancedChecklist) AddGroup(groupName string) error
func (*AdvancedChecklist) AddTask ¶
func (c *AdvancedChecklist) AddTask(groupName, taskTitle string) error
func (*AdvancedChecklist) CompleteTask ¶
func (c *AdvancedChecklist) CompleteTask(groupName, taskTitle string) error
func (*AdvancedChecklist) DeleteGroup ¶
func (c *AdvancedChecklist) DeleteGroup(groupName string) error
func (*AdvancedChecklist) DeleteTask ¶
func (c *AdvancedChecklist) DeleteTask(groupName, taskTitle string) error
func (*AdvancedChecklist) GetGroup ¶
func (c *AdvancedChecklist) GetGroup(title string) (AdvancedChecklistGroup, bool)
func (*AdvancedChecklist) ReopenTask ¶
func (c *AdvancedChecklist) ReopenTask(groupName, taskTitle string) error
func (*AdvancedChecklist) Sort ¶
func (c *AdvancedChecklist) Sort()
type AdvancedChecklistGroup ¶
type AdvancedChecklistGroup struct { Name string `json:"name"` LastActive time.Time `json:"lastActive"` Sections []AdvancedChecklistSection `json:"sections"` Tasks AdvancedChecklistTasks `json:"tasks"` Collapsed bool `json:"collapsed"` }
type AdvancedChecklistTask ¶
type AdvancedChecklistTasks ¶
type AdvancedChecklistTasks []AdvancedChecklistTask
func (*AdvancedChecklistTasks) Sort ¶
func (t *AdvancedChecklistTasks) Sort()
type AdvancedChecklists ¶
type AdvancedChecklists []AdvancedChecklist
func (AdvancedChecklists) Sort ¶
func (cs AdvancedChecklists) Sort()
type AppDataContent ¶
type AppDataContent struct { OrgStandardNotesSN OrgStandardNotesSNDetail `json:"org.standardnotes.sn"` OrgStandardNotesSNComponents OrgStandardNotesSNComponentsDetail `json:"org.standardnotes.sn.components,omitempty"` }
type AppTagConfig ¶
type AppTagConfig struct { Email string Token string FindText string FindTag string NewTags []string Debug bool }
AppTagConfig defines expected configuration structure for making Tag related operations.
type CompareEncryptedItemsInput ¶
type CompareEncryptedItemsInput struct { Session *session.Session FirstItem EncryptedItem FirstItemsKey session.SessionItemsKey SecondItem EncryptedItem SecondItemsKey session.SessionItemsKey }
type CompareItemsInput ¶
type Component ¶
type Component struct { ItemCommon Content ComponentContent }
func NewComponent ¶
func NewComponent() Component
NewComponent returns an Item of type Component without content.
func (Component) GetContent ¶
func (Component) GetContentSize ¶
func (Component) GetContentType ¶
func (Component) GetCreatedAt ¶
func (Component) GetCreatedAtTimestamp ¶
func (Component) GetDuplicateOf ¶
func (Component) GetItemsKeyID ¶
func (Component) GetUpdatedAt ¶
func (Component) GetUpdatedAtTimestamp ¶
func (*Component) SetContent ¶
func (*Component) SetContentSize ¶
func (*Component) SetContentType ¶
func (*Component) SetCreatedAt ¶
func (*Component) SetCreatedAtTimestamp ¶
func (*Component) SetDeleted ¶
func (*Component) SetUpdatedAt ¶
func (*Component) SetUpdatedAtTimestamp ¶
type ComponentContent ¶
type ComponentContent struct { Identifier string `json:"identifier"` LegacyURL string `json:"legacy_url"` HostedURL string `json:"hosted_url"` LocalURL string `json:"local_url"` URL string `json:"url"` ValidUntil string `json:"valid_until"` OfflineOnly bool `json:"offlineOnly"` Name string `json:"name"` Area string `json:"area"` PackageInfo interface{} `json:"package_info"` Permissions interface{} `json:"permissions"` Active interface{} `json:"active"` AutoUpdateDisabled string `json:"autoupdateDisabled"` ComponentData interface{} `json:"componentData"` DissociatedItemIds []string `json:"disassociatedItemIds"` AssociatedItemIds []string `json:"associatedItemIds"` ItemReferences ItemReferences `json:"references"` AppData AppDataContent `json:"appData"` }
func NewComponentContent ¶
func NewComponentContent() *ComponentContent
NewComponentContent returns an empty Tag content instance.
func (*ComponentContent) AssociateItems ¶
func (cc *ComponentContent) AssociateItems(newItems []string)
func (*ComponentContent) DisassociateItems ¶
func (cc *ComponentContent) DisassociateItems(itemsToRemove []string)
func (*ComponentContent) GetActive ¶
func (cc *ComponentContent) GetActive() bool
func (*ComponentContent) GetAppData ¶
func (cc *ComponentContent) GetAppData() AppDataContent
func (*ComponentContent) GetItemAssociations ¶
func (cc *ComponentContent) GetItemAssociations() []string
func (*ComponentContent) GetItemDisassociations ¶
func (cc *ComponentContent) GetItemDisassociations() []string
func (*ComponentContent) GetName ¶
func (cc *ComponentContent) GetName() string
func (ComponentContent) GetTitle ¶
func (cc ComponentContent) GetTitle() string
func (*ComponentContent) GetUpdateTime ¶
func (cc *ComponentContent) GetUpdateTime() (time.Time, error)
func (ComponentContent) References ¶
func (cc ComponentContent) References() ItemReferences
func (*ComponentContent) SetAppData ¶
func (cc *ComponentContent) SetAppData(data AppDataContent)
func (*ComponentContent) SetReferences ¶
func (cc *ComponentContent) SetReferences(input ItemReferences)
func (*ComponentContent) SetTitle ¶
func (cc *ComponentContent) SetTitle(title string)
func (*ComponentContent) SetUpdateTime ¶
func (cc *ComponentContent) SetUpdateTime(uTime time.Time)
func (*ComponentContent) UpsertReferences ¶
func (cc *ComponentContent) UpsertReferences(input ItemReferences)
type Components ¶
type Components []Component
func (*Components) DeDupe ¶
func (c *Components) DeDupe()
func (Components) Validate ¶
func (c Components) Validate() error
type ConflictedItem ¶
type ConflictedItem struct { ServerItem EncryptedItem `json:"server_item"` UnsavedItem EncryptedItem `json:"unsaved_item"` Type string }
type ConflictedItems ¶
type ConflictedItems []ConflictedItem
func (*ConflictedItems) DeDupe ¶
func (cis *ConflictedItems) DeDupe()
func (ConflictedItems) Validate ¶
func (cis ConflictedItems) Validate(debug bool) error
type Content ¶
type Content interface { References() ItemReferences SetReferences(ItemReferences) }
type DecryptedItem ¶
type DecryptedItem struct { UUID string `json:"uuid"` ItemsKeyID string `json:"items_key_id,omitempty"` Content string `json:"content"` ContentType string `json:"content_type"` DuplicateOf string `json:"duplicate_of,omitempty"` Deleted bool `json:"deleted"` Default bool `json:"isDefault"` CreatedAt string `json:"created_at"` UpdatedAt string `json:"updated_at"` CreatedAtTimestamp int64 `json:"created_at_timestamp"` UpdatedAtTimestamp int64 `json:"updated_at_timestamp"` AuthHash *string `json:"auth_hash,omitempty"` UpdatedWithSession *string `json:"updated_with_session,omitempty"` KeySystemIdentifier *string `json:"key_system_identifier,omitempty"` UserUUID *string `json:"user_uuid,omitempty"` LastEditedByUUID *string `json:"last_edited_by_uuid,omitempty"` }
func DecryptItem ¶
func DecryptItem(e EncryptedItem, s *session.Session, iks []session.SessionItemsKey) (o DecryptedItem, err error)
func (DecryptedItem) Encrypt ¶
func (di DecryptedItem) Encrypt(ik ItemsKey, session *session.Session) (encryptedItem EncryptedItem, err error)
type DecryptedItems ¶
type DecryptedItems []DecryptedItem
func DecryptItems ¶
func DecryptItems(s *session.Session, ei EncryptedItems, iks []session.SessionItemsKey) (o DecryptedItems, err error)
DecryptItems.
func (*DecryptedItems) Parse ¶
func (di *DecryptedItems) Parse() (p Items, err error)
func (*DecryptedItems) RemoveDeleted ¶
func (di *DecryptedItems) RemoveDeleted()
type DefaultSection ¶
type EncItemKey ¶
type EncryptedItem ¶
type EncryptedItem struct { UUID string `json:"uuid"` ItemsKeyID string `json:"items_key_id,omitempty"` Content string `json:"content"` ContentType string `json:"content_type"` EncItemKey string `json:"enc_item_key"` Deleted bool `json:"deleted"` // Default bool `json:"isDefault"` CreatedAt string `json:"created_at"` UpdatedAt string `json:"updated_at"` CreatedAtTimestamp int64 `json:"created_at_timestamp"` UpdatedAtTimestamp int64 `json:"updated_at_timestamp"` DuplicateOf *string `json:"duplicate_of,omitempty"` AuthHash *string `json:"auth_hash,omitempty"` UpdatedWithSession *string `json:"updated_with_session,omitempty"` KeySystemIdentifier *string `json:"key_system_identifier,omitempty"` UserUUID *string `json:"user_uuid,omitempty"` LastEditedByUUID *string `json:"last_edited_by_uuid,omitempty"` }
func EncryptItem ¶
func EncryptItem(item Item, ik session.SessionItemsKey, session *session.Session) (encryptedItem EncryptedItem, err error)
func EncryptItemsKey ¶
func EncryptItemsKey(ik session.SessionItemsKey, s *session.Session, new bool) (encryptedItem EncryptedItem, err error)
func ReEncryptItem ¶
func ReEncryptItem(ei EncryptedItem, decryptionItemsKey session.SessionItemsKey, newItemsKey ItemsKey, newMasterKey string, s *session.Session) (o EncryptedItem, err error)
func (*EncryptedItem) Decrypt ¶
func (ei *EncryptedItem) Decrypt(mk string) (ik ItemsKey, err error)
func (EncryptedItem) DecryptItemOnly ¶
func (ei EncryptedItem) DecryptItemOnly(key string) (content []byte, err error)
func (EncryptedItem) GetItemsKeyID ¶
func (ei EncryptedItem) GetItemsKeyID() string
func (EncryptedItem) IsDeleted ¶
func (ei EncryptedItem) IsDeleted() bool
type EncryptedItemExport ¶
type EncryptedItemExport struct { UUID string `json:"uuid"` ItemsKeyID string `json:"items_key_id,omitempty"` Content string `json:"content"` ContentType string `json:"content_type"` // Deleted bool `json:"deleted"` EncItemKey string `json:"enc_item_key"` CreatedAt string `json:"created_at"` UpdatedAt string `json:"updated_at"` CreatedAtTimestamp int64 `json:"created_at_timestamp"` UpdatedAtTimestamp int64 `json:"updated_at_timestamp"` DuplicateOf *string `json:"duplicate_of"` }
type EncryptedItems ¶
type EncryptedItems []EncryptedItem
func (*EncryptedItems) DeDupe ¶
func (ei *EncryptedItems) DeDupe()
func (EncryptedItems) DecryptAndParse ¶
func (ei EncryptedItems) DecryptAndParse(s *session.Session) (o Items, err error)
func (EncryptedItems) DecryptAndParseItemsKeys ¶
func (ei EncryptedItems) DecryptAndParseItemsKeys(mk string, debug bool) (o []session.SessionItemsKey, err error)
func (EncryptedItems) ReEncrypt ¶
func (ei EncryptedItems) ReEncrypt(s *session.Session, decryptionItemsKey session.SessionItemsKey, newItemsKey ItemsKey, newMasterKey string) (o EncryptedItems, err error)
func (*EncryptedItems) RemoveDeleted ¶
func (ei *EncryptedItems) RemoveDeleted()
func (*EncryptedItems) RemoveUnsupported ¶
func (ei *EncryptedItems) RemoveUnsupported()
func (*EncryptedItems) Validate ¶
func (ei *EncryptedItems) Validate() error
type EncryptedItemsFile ¶
type EncryptedItemsFile struct { Items EncryptedItems `json:"items"` KeyParams auth.KeyParams `json:"keyParams"` }
type Extension ¶
type Extension struct { ItemCommon Content ExtensionContent }
func NewExtension ¶
func NewExtension() Extension
NewExtension returns an Item of type Extension without content.
func (Extension) GetContent ¶
func (Extension) GetContentSize ¶
func (Extension) GetContentType ¶
func (Extension) GetCreatedAt ¶
func (Extension) GetCreatedAtTimestamp ¶
func (Extension) GetDuplicateOf ¶
func (Extension) GetItemsKeyID ¶
func (Extension) GetUpdatedAt ¶
func (Extension) GetUpdatedAtTimestamp ¶
func (*Extension) SetContent ¶
func (*Extension) SetContentSize ¶
func (*Extension) SetContentType ¶
func (*Extension) SetCreatedAt ¶
func (*Extension) SetCreatedAtTimestamp ¶
func (*Extension) SetDeleted ¶
func (*Extension) SetUpdatedAt ¶
func (*Extension) SetUpdatedAtTimestamp ¶
type ExtensionContent ¶
type ExtensionContent struct { ItemReferences ItemReferences `json:"references"` AppData AppDataContent `json:"appData"` Name string `json:"name"` DissociatedItemIds []string `json:"disassociatedItemIds"` AssociatedItemIds []string `json:"associatedItemIds"` Active interface{} `json:"active"` }
func NewExtensionContent ¶
func NewExtensionContent() *ExtensionContent
NewExtensionContent returns an empty Tag content instance.
func (*ExtensionContent) AssociateItems ¶
func (cc *ExtensionContent) AssociateItems(newItems []string)
func (*ExtensionContent) DisassociateItems ¶
func (cc *ExtensionContent) DisassociateItems(itemsToRemove []string)
func (*ExtensionContent) GetActive ¶
func (cc *ExtensionContent) GetActive() bool
func (*ExtensionContent) GetAppData ¶
func (cc *ExtensionContent) GetAppData() AppDataContent
func (*ExtensionContent) GetItemAssociations ¶
func (cc *ExtensionContent) GetItemAssociations() []string
func (*ExtensionContent) GetItemDisassociations ¶
func (cc *ExtensionContent) GetItemDisassociations() []string
func (*ExtensionContent) GetName ¶
func (cc *ExtensionContent) GetName() string
func (ExtensionContent) GetTitle ¶
func (cc ExtensionContent) GetTitle() string
func (*ExtensionContent) GetUpdateTime ¶
func (cc *ExtensionContent) GetUpdateTime() (time.Time, error)
func (ExtensionContent) References ¶
func (cc ExtensionContent) References() ItemReferences
func (*ExtensionContent) SetAppData ¶
func (cc *ExtensionContent) SetAppData(data AppDataContent)
func (*ExtensionContent) SetReferences ¶
func (cc *ExtensionContent) SetReferences(input ItemReferences)
func (*ExtensionContent) SetTitle ¶
func (cc *ExtensionContent) SetTitle(title string)
func (*ExtensionContent) SetUpdateTime ¶
func (cc *ExtensionContent) SetUpdateTime(uTime time.Time)
func (*ExtensionContent) UpsertReferences ¶
func (cc *ExtensionContent) UpsertReferences(input ItemReferences)
type ExtensionRepo ¶
type ExtensionRepo struct { ItemCommon Content ExtensionRepoContent }
func NewExtensionRepo ¶
func NewExtensionRepo() ExtensionRepo
NewExtensionRepo returns an Item of type ExtensionRepo without content.
func (ExtensionRepo) GetContent ¶
func (c ExtensionRepo) GetContent() Content
func (ExtensionRepo) GetContentSize ¶
func (c ExtensionRepo) GetContentSize() int
func (ExtensionRepo) GetContentType ¶
func (c ExtensionRepo) GetContentType() string
func (ExtensionRepo) GetCreatedAt ¶
func (c ExtensionRepo) GetCreatedAt() string
func (ExtensionRepo) GetCreatedAtTimestamp ¶
func (c ExtensionRepo) GetCreatedAtTimestamp() int64
func (ExtensionRepo) GetDuplicateOf ¶
func (c ExtensionRepo) GetDuplicateOf() string
func (ExtensionRepo) GetItemsKeyID ¶
func (c ExtensionRepo) GetItemsKeyID() string
func (ExtensionRepo) GetUUID ¶
func (c ExtensionRepo) GetUUID() string
func (ExtensionRepo) GetUpdatedAt ¶
func (c ExtensionRepo) GetUpdatedAt() string
func (ExtensionRepo) GetUpdatedAtTimestamp ¶
func (c ExtensionRepo) GetUpdatedAtTimestamp() int64
func (ExtensionRepo) IsDefault ¶
func (c ExtensionRepo) IsDefault() bool
func (ExtensionRepo) IsDeleted ¶
func (c ExtensionRepo) IsDeleted() bool
func (*ExtensionRepo) SetContent ¶
func (c *ExtensionRepo) SetContent(cc Content)
func (*ExtensionRepo) SetContentSize ¶
func (c *ExtensionRepo) SetContentSize(s int)
func (*ExtensionRepo) SetContentType ¶
func (c *ExtensionRepo) SetContentType(ct string)
func (*ExtensionRepo) SetCreatedAt ¶
func (c *ExtensionRepo) SetCreatedAt(ca string)
func (*ExtensionRepo) SetCreatedAtTimestamp ¶
func (c *ExtensionRepo) SetCreatedAtTimestamp(ca int64)
func (*ExtensionRepo) SetDeleted ¶
func (c *ExtensionRepo) SetDeleted(d bool)
func (*ExtensionRepo) SetUUID ¶
func (c *ExtensionRepo) SetUUID(u string)
func (*ExtensionRepo) SetUpdatedAt ¶
func (c *ExtensionRepo) SetUpdatedAt(ca string)
func (*ExtensionRepo) SetUpdatedAtTimestamp ¶
func (c *ExtensionRepo) SetUpdatedAtTimestamp(ca int64)
type ExtensionRepoContent ¶
type ExtensionRepoContent struct { ItemReferences ItemReferences `json:"references"` AppData AppDataContent `json:"appData"` Name string `json:"name"` DissociatedItemIds []string `json:"disassociatedItemIds"` AssociatedItemIds []string `json:"associatedItemIds"` Active interface{} `json:"active"` }
func NewExtensionRepoContent ¶
func NewExtensionRepoContent() *ExtensionRepoContent
NewExtensionRepoContent returns an empty Tag content instance.
func (*ExtensionRepoContent) AssociateItems ¶
func (cc *ExtensionRepoContent) AssociateItems(newItems []string)
func (*ExtensionRepoContent) DisassociateItems ¶
func (cc *ExtensionRepoContent) DisassociateItems(itemsToRemove []string)
func (*ExtensionRepoContent) GetActive ¶
func (cc *ExtensionRepoContent) GetActive() bool
func (*ExtensionRepoContent) GetAppData ¶
func (cc *ExtensionRepoContent) GetAppData() AppDataContent
func (*ExtensionRepoContent) GetItemAssociations ¶
func (cc *ExtensionRepoContent) GetItemAssociations() []string
func (*ExtensionRepoContent) GetItemDisassociations ¶
func (cc *ExtensionRepoContent) GetItemDisassociations() []string
func (*ExtensionRepoContent) GetName ¶
func (cc *ExtensionRepoContent) GetName() string
func (ExtensionRepoContent) GetTitle ¶
func (cc ExtensionRepoContent) GetTitle() string
func (*ExtensionRepoContent) GetUpdateTime ¶
func (cc *ExtensionRepoContent) GetUpdateTime() (time.Time, error)
func (ExtensionRepoContent) References ¶
func (cc ExtensionRepoContent) References() ItemReferences
func (*ExtensionRepoContent) SetAppData ¶
func (cc *ExtensionRepoContent) SetAppData(data AppDataContent)
func (*ExtensionRepoContent) SetReferences ¶
func (cc *ExtensionRepoContent) SetReferences(input ItemReferences)
func (*ExtensionRepoContent) SetTitle ¶
func (cc *ExtensionRepoContent) SetTitle(title string)
func (*ExtensionRepoContent) SetUpdateTime ¶
func (cc *ExtensionRepoContent) SetUpdateTime(uTime time.Time)
func (*ExtensionRepoContent) UpsertReferences ¶
func (cc *ExtensionRepoContent) UpsertReferences(input ItemReferences)
type ExtensionRepos ¶
type ExtensionRepos []ExtensionRepo
func (*ExtensionRepos) DeDupe ¶
func (c *ExtensionRepos) DeDupe()
func (ExtensionRepos) Validate ¶
func (c ExtensionRepos) Validate() error
type Extensions ¶
type Extensions []Extension
func (*Extensions) DeDupe ¶
func (c *Extensions) DeDupe()
func (Extensions) Validate ¶
func (c Extensions) Validate() error
type File ¶
type File struct { ItemCommon Content FileContent }
func (File) GetContent ¶
func (File) GetContentSize ¶
func (File) GetContentType ¶
func (File) GetCreatedAt ¶
func (File) GetCreatedAtTimestamp ¶
func (File) GetDuplicateOf ¶
func (File) GetItemsKeyID ¶
func (File) GetUpdatedAt ¶
func (File) GetUpdatedAtTimestamp ¶
func (*File) SetContent ¶
func (*File) SetContentSize ¶
func (*File) SetContentType ¶
func (*File) SetCreatedAt ¶
func (*File) SetCreatedAtTimestamp ¶
func (*File) SetDeleted ¶
func (*File) SetUpdatedAt ¶
func (*File) SetUpdatedAtTimestamp ¶
type FileContent ¶
type FileContent struct { EncryptionHeader string `json:"encryptionHeader"` Key string `json:"key"` MimeType string `json:"mimeType"` Name string `json:"name"` RemoteIdentifier string `json:"remoteIdentifier"` ItemReferences ItemReferences `json:"references"` AppData AppDataContent `json:"appData"` DissociatedItemIds []string `json:"disassociatedItemIds"` AssociatedItemIds []string `json:"associatedItemIds"` Active interface{} `json:"active"` }
func NewFileContent ¶
func NewFileContent() *FileContent
NewTagContent returns an empty Tag content instance.
func (*FileContent) AssociateItems ¶
func (cc *FileContent) AssociateItems(newItems []string)
func (*FileContent) DisassociateItems ¶
func (cc *FileContent) DisassociateItems(itemsToRemove []string)
func (*FileContent) GetActive ¶
func (cc *FileContent) GetActive() bool
func (*FileContent) GetAppData ¶
func (cc *FileContent) GetAppData() AppDataContent
func (*FileContent) GetItemAssociations ¶
func (cc *FileContent) GetItemAssociations() []string
func (*FileContent) GetItemDisassociations ¶
func (cc *FileContent) GetItemDisassociations() []string
func (*FileContent) GetName ¶
func (cc *FileContent) GetName() string
func (FileContent) GetTitle ¶
func (cc FileContent) GetTitle() string
func (*FileContent) GetUpdateTime ¶
func (cc *FileContent) GetUpdateTime() (time.Time, error)
func (FileContent) References ¶
func (cc FileContent) References() ItemReferences
func (*FileContent) SetAppData ¶
func (cc *FileContent) SetAppData(data AppDataContent)
func (*FileContent) SetReferences ¶
func (cc *FileContent) SetReferences(input ItemReferences)
func (*FileContent) SetTitle ¶
func (cc *FileContent) SetTitle(title string)
func (*FileContent) SetUpdateTime ¶
func (cc *FileContent) SetUpdateTime(uTime time.Time)
func (*FileContent) UpsertReferences ¶
func (cc *FileContent) UpsertReferences(input ItemReferences)
type FileSafeCredentials ¶
type FileSafeCredentials struct { ItemCommon Content FileSafeCredentialsContent }
func NewFileSafeCredentials ¶
func NewFileSafeCredentials() FileSafeCredentials
NewFileSafeCredentials returns an Item of type FileSafeCredentials without content.
func (FileSafeCredentials) GetContent ¶
func (c FileSafeCredentials) GetContent() Content
func (FileSafeCredentials) GetContentSize ¶
func (c FileSafeCredentials) GetContentSize() int
func (FileSafeCredentials) GetContentType ¶
func (c FileSafeCredentials) GetContentType() string
func (FileSafeCredentials) GetCreatedAt ¶
func (c FileSafeCredentials) GetCreatedAt() string
func (FileSafeCredentials) GetCreatedAtTimestamp ¶
func (c FileSafeCredentials) GetCreatedAtTimestamp() int64
func (FileSafeCredentials) GetDuplicateOf ¶
func (c FileSafeCredentials) GetDuplicateOf() string
func (FileSafeCredentials) GetItemsKeyID ¶
func (c FileSafeCredentials) GetItemsKeyID() string
func (FileSafeCredentials) GetUUID ¶
func (c FileSafeCredentials) GetUUID() string
func (FileSafeCredentials) GetUpdatedAt ¶
func (c FileSafeCredentials) GetUpdatedAt() string
func (FileSafeCredentials) GetUpdatedAtTimestamp ¶
func (c FileSafeCredentials) GetUpdatedAtTimestamp() int64
func (FileSafeCredentials) IsDefault ¶
func (c FileSafeCredentials) IsDefault() bool
func (FileSafeCredentials) IsDeleted ¶
func (c FileSafeCredentials) IsDeleted() bool
func (*FileSafeCredentials) SetContent ¶
func (c *FileSafeCredentials) SetContent(cc Content)
func (*FileSafeCredentials) SetContentSize ¶
func (c *FileSafeCredentials) SetContentSize(s int)
func (*FileSafeCredentials) SetContentType ¶
func (c *FileSafeCredentials) SetContentType(ct string)
func (*FileSafeCredentials) SetCreatedAt ¶
func (c *FileSafeCredentials) SetCreatedAt(ca string)
func (*FileSafeCredentials) SetCreatedAtTimestamp ¶
func (c *FileSafeCredentials) SetCreatedAtTimestamp(ca int64)
func (*FileSafeCredentials) SetDeleted ¶
func (c *FileSafeCredentials) SetDeleted(d bool)
func (*FileSafeCredentials) SetUUID ¶
func (c *FileSafeCredentials) SetUUID(u string)
func (*FileSafeCredentials) SetUpdatedAt ¶
func (c *FileSafeCredentials) SetUpdatedAt(ca string)
func (*FileSafeCredentials) SetUpdatedAtTimestamp ¶
func (c *FileSafeCredentials) SetUpdatedAtTimestamp(ca int64)
type FileSafeCredentialsContent ¶
type FileSafeCredentialsContent struct { Keys json.RawMessage `json:"keys"` AuthParams json.RawMessage `json:"authParams"` IsDefault json.RawMessage `json:"isDefault"` ItemReferences ItemReferences `json:"references"` AppData AppDataContent `json:"appData"` Name string `json:"name"` DissociatedItemIds []string `json:"disassociatedItemIds"` AssociatedItemIds []string `json:"associatedItemIds"` Active interface{} `json:"active"` }
func NewFileSafeCredentialsContent ¶
func NewFileSafeCredentialsContent() *FileSafeCredentialsContent
NewTagContent returns an empty Tag content instance.
func (*FileSafeCredentialsContent) AssociateItems ¶
func (cc *FileSafeCredentialsContent) AssociateItems(newItems []string)
func (*FileSafeCredentialsContent) DisassociateItems ¶
func (cc *FileSafeCredentialsContent) DisassociateItems(itemsToRemove []string)
func (*FileSafeCredentialsContent) GetActive ¶
func (cc *FileSafeCredentialsContent) GetActive() bool
func (*FileSafeCredentialsContent) GetAppData ¶
func (cc *FileSafeCredentialsContent) GetAppData() AppDataContent
func (*FileSafeCredentialsContent) GetItemAssociations ¶
func (cc *FileSafeCredentialsContent) GetItemAssociations() []string
func (*FileSafeCredentialsContent) GetItemDisassociations ¶
func (cc *FileSafeCredentialsContent) GetItemDisassociations() []string
func (*FileSafeCredentialsContent) GetName ¶
func (cc *FileSafeCredentialsContent) GetName() string
func (FileSafeCredentialsContent) GetTitle ¶
func (cc FileSafeCredentialsContent) GetTitle() string
func (*FileSafeCredentialsContent) GetUpdateTime ¶
func (cc *FileSafeCredentialsContent) GetUpdateTime() (time.Time, error)
func (FileSafeCredentialsContent) References ¶
func (cc FileSafeCredentialsContent) References() ItemReferences
func (*FileSafeCredentialsContent) SetAppData ¶
func (cc *FileSafeCredentialsContent) SetAppData(data AppDataContent)
func (*FileSafeCredentialsContent) SetReferences ¶
func (cc *FileSafeCredentialsContent) SetReferences(input ItemReferences)
func (*FileSafeCredentialsContent) SetTitle ¶
func (cc *FileSafeCredentialsContent) SetTitle(title string)
func (*FileSafeCredentialsContent) SetUpdateTime ¶
func (cc *FileSafeCredentialsContent) SetUpdateTime(uTime time.Time)
func (*FileSafeCredentialsContent) UpsertReferences ¶
func (cc *FileSafeCredentialsContent) UpsertReferences(input ItemReferences)
type FileSafeCredentialss ¶
type FileSafeCredentialss []FileSafeCredentials
func (*FileSafeCredentialss) DeDupe ¶
func (c *FileSafeCredentialss) DeDupe()
func (FileSafeCredentialss) Validate ¶
func (c FileSafeCredentialss) Validate() error
type FileSafeFileMetaData ¶
type FileSafeFileMetaData struct { ItemCommon Content FileSafeFileMetaDataContent }
func NewFileSafeFileMetaData ¶
func NewFileSafeFileMetaData() FileSafeFileMetaData
NewFileSafeFileMetaData returns an Item of type FileSafeFileMetaData without content.
func (FileSafeFileMetaData) GetContent ¶
func (c FileSafeFileMetaData) GetContent() Content
func (FileSafeFileMetaData) GetContentSize ¶
func (c FileSafeFileMetaData) GetContentSize() int
func (FileSafeFileMetaData) GetContentType ¶
func (c FileSafeFileMetaData) GetContentType() string
func (FileSafeFileMetaData) GetCreatedAt ¶
func (c FileSafeFileMetaData) GetCreatedAt() string
func (FileSafeFileMetaData) GetCreatedAtTimestamp ¶
func (c FileSafeFileMetaData) GetCreatedAtTimestamp() int64
func (FileSafeFileMetaData) GetDuplicateOf ¶
func (c FileSafeFileMetaData) GetDuplicateOf() string
func (FileSafeFileMetaData) GetItemsKeyID ¶
func (c FileSafeFileMetaData) GetItemsKeyID() string
func (FileSafeFileMetaData) GetUUID ¶
func (c FileSafeFileMetaData) GetUUID() string
func (FileSafeFileMetaData) GetUpdatedAt ¶
func (c FileSafeFileMetaData) GetUpdatedAt() string
func (FileSafeFileMetaData) GetUpdatedAtTimestamp ¶
func (c FileSafeFileMetaData) GetUpdatedAtTimestamp() int64
func (FileSafeFileMetaData) IsDefault ¶
func (c FileSafeFileMetaData) IsDefault() bool
func (FileSafeFileMetaData) IsDeleted ¶
func (c FileSafeFileMetaData) IsDeleted() bool
func (*FileSafeFileMetaData) SetContent ¶
func (c *FileSafeFileMetaData) SetContent(cc Content)
func (*FileSafeFileMetaData) SetContentSize ¶
func (c *FileSafeFileMetaData) SetContentSize(s int)
func (*FileSafeFileMetaData) SetContentType ¶
func (c *FileSafeFileMetaData) SetContentType(ct string)
func (*FileSafeFileMetaData) SetCreatedAt ¶
func (c *FileSafeFileMetaData) SetCreatedAt(ca string)
func (*FileSafeFileMetaData) SetCreatedAtTimestamp ¶
func (c *FileSafeFileMetaData) SetCreatedAtTimestamp(ca int64)
func (*FileSafeFileMetaData) SetDeleted ¶
func (c *FileSafeFileMetaData) SetDeleted(d bool)
func (*FileSafeFileMetaData) SetUUID ¶
func (c *FileSafeFileMetaData) SetUUID(u string)
func (*FileSafeFileMetaData) SetUpdatedAt ¶
func (c *FileSafeFileMetaData) SetUpdatedAt(ca string)
func (*FileSafeFileMetaData) SetUpdatedAtTimestamp ¶
func (c *FileSafeFileMetaData) SetUpdatedAtTimestamp(ca int64)
type FileSafeFileMetaDataContent ¶
type FileSafeFileMetaDataContent struct { ServerMetadata json.RawMessage `json:"serverMetadata"` ItemReferences ItemReferences `json:"references"` AppData AppDataContent `json:"appData"` Name string `json:"name"` DissociatedItemIds []string `json:"disassociatedItemIds"` AssociatedItemIds []string `json:"associatedItemIds"` Active interface{} `json:"active"` }
func NewFileSafeFileMetaDataContent ¶
func NewFileSafeFileMetaDataContent() *FileSafeFileMetaDataContent
NewTagContent returns an empty Tag content instance.
func (*FileSafeFileMetaDataContent) AssociateItems ¶
func (cc *FileSafeFileMetaDataContent) AssociateItems(newItems []string)
func (*FileSafeFileMetaDataContent) DisassociateItems ¶
func (cc *FileSafeFileMetaDataContent) DisassociateItems(itemsToRemove []string)
func (*FileSafeFileMetaDataContent) GetActive ¶
func (cc *FileSafeFileMetaDataContent) GetActive() bool
func (*FileSafeFileMetaDataContent) GetAppData ¶
func (cc *FileSafeFileMetaDataContent) GetAppData() AppDataContent
func (*FileSafeFileMetaDataContent) GetItemAssociations ¶
func (cc *FileSafeFileMetaDataContent) GetItemAssociations() []string
func (*FileSafeFileMetaDataContent) GetItemDisassociations ¶
func (cc *FileSafeFileMetaDataContent) GetItemDisassociations() []string
func (*FileSafeFileMetaDataContent) GetName ¶
func (cc *FileSafeFileMetaDataContent) GetName() string
func (FileSafeFileMetaDataContent) GetTitle ¶
func (cc FileSafeFileMetaDataContent) GetTitle() string
func (*FileSafeFileMetaDataContent) GetUpdateTime ¶
func (cc *FileSafeFileMetaDataContent) GetUpdateTime() (time.Time, error)
func (FileSafeFileMetaDataContent) References ¶
func (cc FileSafeFileMetaDataContent) References() ItemReferences
func (*FileSafeFileMetaDataContent) SetAppData ¶
func (cc *FileSafeFileMetaDataContent) SetAppData(data AppDataContent)
func (*FileSafeFileMetaDataContent) SetReferences ¶
func (cc *FileSafeFileMetaDataContent) SetReferences(input ItemReferences)
func (*FileSafeFileMetaDataContent) SetTitle ¶
func (cc *FileSafeFileMetaDataContent) SetTitle(title string)
func (*FileSafeFileMetaDataContent) SetUpdateTime ¶
func (cc *FileSafeFileMetaDataContent) SetUpdateTime(uTime time.Time)
func (*FileSafeFileMetaDataContent) UpsertReferences ¶
func (cc *FileSafeFileMetaDataContent) UpsertReferences(input ItemReferences)
type FileSafeFileMetaDatas ¶
type FileSafeFileMetaDatas []FileSafeFileMetaData
func (*FileSafeFileMetaDatas) DeDupe ¶
func (c *FileSafeFileMetaDatas) DeDupe()
func (FileSafeFileMetaDatas) Validate ¶
func (c FileSafeFileMetaDatas) Validate() error
type FileSafeIntegration ¶
type FileSafeIntegration struct { ItemCommon Content FileSafeIntegrationContent }
func NewFileSafeIntegration ¶
func NewFileSafeIntegration() FileSafeIntegration
NewFileSafeIntegration returns an Item of type FileSafeIntegration without content.
func (FileSafeIntegration) GetContent ¶
func (c FileSafeIntegration) GetContent() Content
func (FileSafeIntegration) GetContentSize ¶
func (c FileSafeIntegration) GetContentSize() int
func (FileSafeIntegration) GetContentType ¶
func (c FileSafeIntegration) GetContentType() string
func (FileSafeIntegration) GetCreatedAt ¶
func (c FileSafeIntegration) GetCreatedAt() string
func (FileSafeIntegration) GetCreatedAtTimestamp ¶
func (c FileSafeIntegration) GetCreatedAtTimestamp() int64
func (FileSafeIntegration) GetDuplicateOf ¶
func (c FileSafeIntegration) GetDuplicateOf() string
func (FileSafeIntegration) GetItemsKeyID ¶
func (c FileSafeIntegration) GetItemsKeyID() string
func (FileSafeIntegration) GetUUID ¶
func (c FileSafeIntegration) GetUUID() string
func (FileSafeIntegration) GetUpdatedAt ¶
func (c FileSafeIntegration) GetUpdatedAt() string
func (FileSafeIntegration) GetUpdatedAtTimestamp ¶
func (c FileSafeIntegration) GetUpdatedAtTimestamp() int64
func (FileSafeIntegration) IsDefault ¶
func (c FileSafeIntegration) IsDefault() bool
func (FileSafeIntegration) IsDeleted ¶
func (c FileSafeIntegration) IsDeleted() bool
func (*FileSafeIntegration) SetContent ¶
func (c *FileSafeIntegration) SetContent(cc Content)
func (*FileSafeIntegration) SetContentSize ¶
func (c *FileSafeIntegration) SetContentSize(s int)
func (*FileSafeIntegration) SetContentType ¶
func (c *FileSafeIntegration) SetContentType(ct string)
func (*FileSafeIntegration) SetCreatedAt ¶
func (c *FileSafeIntegration) SetCreatedAt(ca string)
func (*FileSafeIntegration) SetCreatedAtTimestamp ¶
func (c *FileSafeIntegration) SetCreatedAtTimestamp(ca int64)
func (*FileSafeIntegration) SetDeleted ¶
func (c *FileSafeIntegration) SetDeleted(d bool)
func (*FileSafeIntegration) SetUUID ¶
func (c *FileSafeIntegration) SetUUID(u string)
func (*FileSafeIntegration) SetUpdatedAt ¶
func (c *FileSafeIntegration) SetUpdatedAt(ca string)
func (*FileSafeIntegration) SetUpdatedAtTimestamp ¶
func (c *FileSafeIntegration) SetUpdatedAtTimestamp(ca int64)
type FileSafeIntegrationContent ¶
type FileSafeIntegrationContent struct { Source string `json:"source"` Authorization string `json:"authorization"` RelayURL string `json:"relayUrl"` RawCode string `json:"rawCode"` IsDefaultUploadSource bool `json:"isDefaultUploadSource"` ItemReferences ItemReferences `json:"references"` AppData AppDataContent `json:"appData"` Name string `json:"name"` DissociatedItemIds []string `json:"disassociatedItemIds"` AssociatedItemIds []string `json:"associatedItemIds"` Active interface{} `json:"active"` }
func NewFileSafeIntegrationContent ¶
func NewFileSafeIntegrationContent() *FileSafeIntegrationContent
NewTagContent returns an empty Tag content instance.
func (*FileSafeIntegrationContent) AssociateItems ¶
func (cc *FileSafeIntegrationContent) AssociateItems(newItems []string)
func (*FileSafeIntegrationContent) DisassociateItems ¶
func (cc *FileSafeIntegrationContent) DisassociateItems(itemsToRemove []string)
func (*FileSafeIntegrationContent) GetActive ¶
func (cc *FileSafeIntegrationContent) GetActive() bool
func (*FileSafeIntegrationContent) GetAppData ¶
func (cc *FileSafeIntegrationContent) GetAppData() AppDataContent
func (*FileSafeIntegrationContent) GetItemAssociations ¶
func (cc *FileSafeIntegrationContent) GetItemAssociations() []string
func (*FileSafeIntegrationContent) GetItemDisassociations ¶
func (cc *FileSafeIntegrationContent) GetItemDisassociations() []string
func (*FileSafeIntegrationContent) GetName ¶
func (cc *FileSafeIntegrationContent) GetName() string
func (FileSafeIntegrationContent) GetTitle ¶
func (cc FileSafeIntegrationContent) GetTitle() string
func (*FileSafeIntegrationContent) GetUpdateTime ¶
func (cc *FileSafeIntegrationContent) GetUpdateTime() (time.Time, error)
func (FileSafeIntegrationContent) References ¶
func (cc FileSafeIntegrationContent) References() ItemReferences
func (*FileSafeIntegrationContent) SetAppData ¶
func (cc *FileSafeIntegrationContent) SetAppData(data AppDataContent)
func (*FileSafeIntegrationContent) SetReferences ¶
func (cc *FileSafeIntegrationContent) SetReferences(input ItemReferences)
func (*FileSafeIntegrationContent) SetTitle ¶
func (cc *FileSafeIntegrationContent) SetTitle(title string)
func (*FileSafeIntegrationContent) SetUpdateTime ¶
func (cc *FileSafeIntegrationContent) SetUpdateTime(uTime time.Time)
func (*FileSafeIntegrationContent) UpsertReferences ¶
func (cc *FileSafeIntegrationContent) UpsertReferences(input ItemReferences)
type FileSafeIntegrations ¶
type FileSafeIntegrations []FileSafeIntegration
func (*FileSafeIntegrations) DeDupe ¶
func (c *FileSafeIntegrations) DeDupe()
func (FileSafeIntegrations) Validate ¶
func (c FileSafeIntegrations) Validate() error
type Item ¶
type Item interface { GetItemsKeyID() string GetUUID() string SetUUID(string) GetContentSize() int SetContentSize(int) GetContentType() string SetContentType(string) IsDeleted() bool SetDeleted(bool) GetCreatedAt() string SetCreatedAt(string) SetUpdatedAt(string) GetUpdatedAt() string GetCreatedAtTimestamp() int64 SetCreatedAtTimestamp(int64) SetUpdatedAtTimestamp(int64) GetUpdatedAtTimestamp() int64 GetContent() Content SetContent(Content) IsDefault() bool GetDuplicateOf() string }
Item defines all types of SN item, e.g. Note, Tag, and Component.
func DecryptAndParseItem ¶
func DecryptAndParseItem(ei EncryptedItem, s *session.Session) (o Item, err error)
func ParseItem ¶
func ParseItem(di DecryptedItem) (p Item, err error)
type ItemCommon ¶
type ItemCommon struct { UUID string ItemsKeyID string EncryptedItemKey string ContentType string Deleted bool DuplicateOf string CreatedAt string UpdatedAt string CreatedAtTimestamp int64 UpdatedAtTimestamp int64 ContentSize int AuthHash *string UpdatedWithSession *string KeySystemIdentifier *string UserUUID *string LastEditedByUUID *string }
ItemCommon contains the fields common to all SN Items.
type ItemFilters ¶
type ItemReference ¶
type ItemReference struct { // unique identifier of the item being referenced UUID string `json:"uuid"` // type of item being referenced ContentType string `json:"content_type"` // type of reference, notetonote, tagtonote, etc ReferenceType string `json:"reference_type,omitempty"` }
ItemReference defines a reference from one item to another.
type ItemReferences ¶
type ItemReferences []ItemReference
func UpsertReferences ¶
func UpsertReferences(existing, new ItemReferences) ItemReferences
type Items ¶
type Items []Item
func DecryptAndParseItems ¶
func DecryptAndParseItems(ei EncryptedItems, s *session.Session) (o Items, err error)
func (Items) Components ¶
func (i Items) Components() (c Components)
func (*Items) Encrypt ¶
func (i *Items) Encrypt(s *session.Session, ik session.SessionItemsKey) (e EncryptedItems, err error)
func (Items) Extension ¶
func (i Items) Extension() (c Extensions)
func (Items) ExtensionRepo ¶
func (i Items) ExtensionRepo() (c ExtensionRepos)
func (Items) FileSafeCredentials ¶
func (i Items) FileSafeCredentials() (c FileSafeCredentialss)
func (Items) FileSafeFileMetaData ¶
func (i Items) FileSafeFileMetaData() (c FileSafeFileMetaDatas)
func (Items) FileSafeIntegration ¶
func (i Items) FileSafeIntegration() (c FileSafeIntegrations)
func (*Items) Filter ¶
func (i *Items) Filter(f ItemFilters)
func (*Items) FilterAllTypes ¶
func (i *Items) FilterAllTypes(f ItemFilters)
func (Items) Privileges ¶
func (i Items) Privileges() (c PrivilegesN)
func (*Items) RemoveDeleted ¶
func (i *Items) RemoveDeleted()
func (Items) SFExtension ¶
func (i Items) SFExtension() (c SFExtensions)
func (Items) UserPreferences ¶
func (i Items) UserPreferences() (c UserPreferencess)
type ItemsKey ¶
type ItemsKey struct { // Following attributes set from: // - unmarshalling of the EncryptedItem UUID string `json:"uuid"` EncryptedItemKey EIT `json:"enc_item_key"` ContentType string `json:"content_type"` Deleted bool `json:"deleted"` CreatedAt string `json:"created_at"` UpdatedAt string `json:"updated_at"` CreatedAtTimestamp int64 `json:"created_at_timestamp"` UpdatedAtTimestamp int64 `json:"updated_at_timestamp"` // Following attributes set from: // - the unmarshalled content, post decryption // - creation of a new ItemsKey ItemsKey string `json:"itemsKey"` Version string `json:"version"` ItemReferences ItemReferences `json:"references"` AppData AppDataContent `json:"appData"` Default bool `json:"isDefault"` // Following attibute set only for the purpose of marshaling a new ItemsKey when encrypting Content ItemsKeyContent `json:"content"` ContentSize int }
func CreateItemsKey ¶
func DecryptAndParseItemKeys ¶
func DecryptAndParseItemKeys(mk string, eiks EncryptedItems) (iks []ItemsKey, err error)
DecryptAndParseItemKeys takes the master key and a list of EncryptedItemKeys and returns a list of items keys.
func DedupeItemsKeys ¶
func NewItemsKey ¶
func NewItemsKey() ItemsKey
NewItemsKey returns an Item of type ItemsKey without content.
type ItemsKeyContent ¶
type ItemsKeyContent struct { ItemsKey string `json:"itemsKey"` Version string `json:"version"` ItemReferences ItemReferences `json:"references"` AppData AppDataContent `json:"appData"` Default bool `json:"isDefault"` }
func NewItemsKeyContent ¶
func NewItemsKeyContent() *ItemsKeyContent
NewItemsKeyContent returns an empty ItemsKey content instance.
func (ItemsKeyContent) AuthData ¶
func (i ItemsKeyContent) AuthData() AppDataContent
func (ItemsKeyContent) MarshalJSON ¶
func (i ItemsKeyContent) MarshalJSON() ([]byte, error)
func (ItemsKeyContent) References ¶
func (i ItemsKeyContent) References() ItemReferences
type ItemsKeyEncKey ¶
type Note ¶
type Note struct { ItemCommon Content NoteContent }
func NewNote ¶
func NewNote(title string, text string, references ItemReferences) (note Note, err error)
NewNote returns an Item of type Note.
func (Note) GetContent ¶
func (Note) GetContentSize ¶
func (Note) GetContentType ¶
func (Note) GetCreatedAt ¶
func (Note) GetCreatedAtTimestamp ¶
func (Note) GetDuplicateOf ¶
func (Note) GetItemsKeyID ¶
func (Note) GetUpdatedAt ¶
func (Note) GetUpdatedAtTimestamp ¶
func (*Note) SetContent ¶
func (*Note) SetContentSize ¶
func (*Note) SetContentType ¶
func (*Note) SetCreatedAt ¶
func (*Note) SetCreatedAtTimestamp ¶
func (*Note) SetDeleted ¶
func (*Note) SetUpdatedAt ¶
func (*Note) SetUpdatedAtTimestamp ¶
type NoteAppDataContent ¶
type NoteAppDataContent struct { OrgStandardNotesSN OrgStandardNotesSNDetail `json:"org.standardnotes.sn"` OrgStandardNotesSNComponents OrgStandardNotesSNComponentsDetail `json:"org.standardnotes.sn.components,omitempty"` }
type NoteContent ¶
type NoteContent struct { Title string `json:"title"` Text string `json:"text"` ItemReferences ItemReferences `json:"references"` AppData NoteAppDataContent `json:"appData"` PreviewPlain string `json:"preview_plain"` Spellcheck bool `json:"spellcheck"` PreviewHtml string `json:"preview_html"` NoteType string `json:"noteType"` EditorIdentifier string `json:"editorIdentifier"` Trashed *bool `json:"trashed,omitempty"` }
func NewNoteContent ¶
func NewNoteContent() *NoteContent
NewNoteContent returns an empty Note content instance.
func (*NoteContent) AddItemAssociations ¶
func (noteContent *NoteContent) AddItemAssociations() string
func (*NoteContent) AssociateItems ¶
func (noteContent *NoteContent) AssociateItems(newItems []string)
func (NoteContent) Copy ¶
func (noteContent NoteContent) Copy() NoteContent
func (*NoteContent) DisassociateItems ¶
func (noteContent *NoteContent) DisassociateItems(newItems []string)
func (*NoteContent) GetActive ¶
func (noteContent *NoteContent) GetActive() bool
func (*NoteContent) GetAppData ¶
func (noteContent *NoteContent) GetAppData() NoteAppDataContent
func (*NoteContent) GetItemAssociations ¶
func (noteContent *NoteContent) GetItemAssociations() []string
func (*NoteContent) GetItemDisassociations ¶
func (noteContent *NoteContent) GetItemDisassociations() []string
func (*NoteContent) GetName ¶
func (noteContent *NoteContent) GetName() string
func (NoteContent) GetPrefersPlainEditor ¶
func (noteContent NoteContent) GetPrefersPlainEditor() bool
func (NoteContent) GetText ¶
func (noteContent NoteContent) GetText() string
func (NoteContent) GetTitle ¶
func (noteContent NoteContent) GetTitle() string
func (*NoteContent) GetTrashed ¶
func (noteContent *NoteContent) GetTrashed() bool
func (*NoteContent) GetUpdateTime ¶
func (noteContent *NoteContent) GetUpdateTime() (time.Time, error)
func (NoteContent) MarshalJSON ¶
func (noteContent NoteContent) MarshalJSON() ([]byte, error)
func (NoteContent) References ¶
func (noteContent NoteContent) References() ItemReferences
func (*NoteContent) SetAppData ¶
func (noteContent *NoteContent) SetAppData(data NoteAppDataContent)
func (*NoteContent) SetPrefersPlainEditor ¶
func (noteContent *NoteContent) SetPrefersPlainEditor(p bool)
func (*NoteContent) SetReferences ¶
func (noteContent *NoteContent) SetReferences(newRefs ItemReferences)
func (*NoteContent) SetText ¶
func (noteContent *NoteContent) SetText(text string)
func (*NoteContent) SetTitle ¶
func (noteContent *NoteContent) SetTitle(title string)
func (*NoteContent) SetTrashed ¶
func (noteContent *NoteContent) SetTrashed(t bool)
func (*NoteContent) SetUpdateTime ¶
func (noteContent *NoteContent) SetUpdateTime(uTime time.Time)
func (NoteContent) ToAdvancedCheckList ¶
func (noteContent NoteContent) ToAdvancedCheckList() (AdvancedChecklist, error)
func (NoteContent) ToTaskList ¶
func (noteContent NoteContent) ToTaskList() (Tasklist, error)
func (*NoteContent) UpsertReferences ¶
func (noteContent *NoteContent) UpsertReferences(newRefs ItemReferences)
type OrgStandardNotesSNComponentsDetail ¶
type OrgStandardNotesSNComponentsDetail map[string]interface{}
type Privileges ¶
type Privileges struct { ItemCommon Content PrivilegesContent }
func NewPrivileges ¶
func NewPrivileges() Privileges
NewPrivileges returns an Item of type Privileges without content.
func (Privileges) GetContent ¶
func (c Privileges) GetContent() Content
func (Privileges) GetContentSize ¶
func (c Privileges) GetContentSize() int
func (Privileges) GetContentType ¶
func (c Privileges) GetContentType() string
func (Privileges) GetCreatedAt ¶
func (c Privileges) GetCreatedAt() string
func (Privileges) GetCreatedAtTimestamp ¶
func (c Privileges) GetCreatedAtTimestamp() int64
func (Privileges) GetDuplicateOf ¶
func (c Privileges) GetDuplicateOf() string
func (Privileges) GetItemsKeyID ¶
func (c Privileges) GetItemsKeyID() string
func (Privileges) GetUUID ¶
func (c Privileges) GetUUID() string
func (Privileges) GetUpdatedAt ¶
func (c Privileges) GetUpdatedAt() string
func (Privileges) GetUpdatedAtTimestamp ¶
func (c Privileges) GetUpdatedAtTimestamp() int64
func (Privileges) IsDefault ¶
func (c Privileges) IsDefault() bool
func (Privileges) IsDeleted ¶
func (c Privileges) IsDeleted() bool
func (*Privileges) SetContent ¶
func (c *Privileges) SetContent(cc Content)
func (*Privileges) SetContentSize ¶
func (c *Privileges) SetContentSize(s int)
func (*Privileges) SetContentType ¶
func (c *Privileges) SetContentType(ct string)
func (*Privileges) SetCreatedAt ¶
func (c *Privileges) SetCreatedAt(ca string)
func (*Privileges) SetCreatedAtTimestamp ¶
func (c *Privileges) SetCreatedAtTimestamp(ca int64)
func (*Privileges) SetDeleted ¶
func (c *Privileges) SetDeleted(d bool)
func (*Privileges) SetUUID ¶
func (c *Privileges) SetUUID(u string)
func (*Privileges) SetUpdatedAt ¶
func (c *Privileges) SetUpdatedAt(ca string)
func (*Privileges) SetUpdatedAtTimestamp ¶
func (c *Privileges) SetUpdatedAtTimestamp(ca int64)
type PrivilegesContent ¶
type PrivilegesContent struct { ItemReferences ItemReferences `json:"references"` AppData AppDataContent `json:"appData"` Name string `json:"name"` DissociatedItemIds []string `json:"disassociatedItemIds"` AssociatedItemIds []string `json:"associatedItemIds"` Active interface{} `json:"active"` }
func NewPrivilegesContent ¶
func NewPrivilegesContent() *PrivilegesContent
NewTagContent returns an empty Tag content instance.
func (*PrivilegesContent) AssociateItems ¶
func (cc *PrivilegesContent) AssociateItems(newItems []string)
func (*PrivilegesContent) DisassociateItems ¶
func (cc *PrivilegesContent) DisassociateItems(itemsToRemove []string)
func (*PrivilegesContent) GetActive ¶
func (cc *PrivilegesContent) GetActive() bool
func (*PrivilegesContent) GetAppData ¶
func (cc *PrivilegesContent) GetAppData() AppDataContent
func (*PrivilegesContent) GetItemAssociations ¶
func (cc *PrivilegesContent) GetItemAssociations() []string
func (*PrivilegesContent) GetItemDisassociations ¶
func (cc *PrivilegesContent) GetItemDisassociations() []string
func (*PrivilegesContent) GetName ¶
func (cc *PrivilegesContent) GetName() string
func (PrivilegesContent) GetTitle ¶
func (cc PrivilegesContent) GetTitle() string
func (*PrivilegesContent) GetUpdateTime ¶
func (cc *PrivilegesContent) GetUpdateTime() (time.Time, error)
func (PrivilegesContent) References ¶
func (cc PrivilegesContent) References() ItemReferences
func (*PrivilegesContent) SetAppData ¶
func (cc *PrivilegesContent) SetAppData(data AppDataContent)
func (*PrivilegesContent) SetReferences ¶
func (cc *PrivilegesContent) SetReferences(input ItemReferences)
func (*PrivilegesContent) SetTitle ¶
func (cc *PrivilegesContent) SetTitle(title string)
func (*PrivilegesContent) SetUpdateTime ¶
func (cc *PrivilegesContent) SetUpdateTime(uTime time.Time)
func (*PrivilegesContent) UpsertReferences ¶
func (cc *PrivilegesContent) UpsertReferences(input ItemReferences)
type PrivilegesN ¶
type PrivilegesN []Privileges
func (*PrivilegesN) DeDupe ¶
func (c *PrivilegesN) DeDupe()
func (PrivilegesN) Validate ¶
func (c PrivilegesN) Validate() error
type SFExtension ¶
type SFExtension struct { ItemCommon Content SFExtensionContent }
func NewSFExtension ¶
func NewSFExtension() SFExtension
NewSFExtension returns an Item of type SFExtension without content.
func (SFExtension) GetContent ¶
func (c SFExtension) GetContent() Content
func (SFExtension) GetContentSize ¶
func (c SFExtension) GetContentSize() int
func (SFExtension) GetContentType ¶
func (c SFExtension) GetContentType() string
func (SFExtension) GetCreatedAt ¶
func (c SFExtension) GetCreatedAt() string
func (SFExtension) GetCreatedAtTimestamp ¶
func (c SFExtension) GetCreatedAtTimestamp() int64
func (SFExtension) GetDuplicateOf ¶
func (c SFExtension) GetDuplicateOf() string
func (SFExtension) GetItemsKeyID ¶
func (c SFExtension) GetItemsKeyID() string
func (SFExtension) GetUUID ¶
func (c SFExtension) GetUUID() string
func (SFExtension) GetUpdatedAt ¶
func (c SFExtension) GetUpdatedAt() string
func (SFExtension) GetUpdatedAtTimestamp ¶
func (c SFExtension) GetUpdatedAtTimestamp() int64
func (SFExtension) IsDefault ¶
func (c SFExtension) IsDefault() bool
func (SFExtension) IsDeleted ¶
func (c SFExtension) IsDeleted() bool
func (*SFExtension) SetContent ¶
func (c *SFExtension) SetContent(cc Content)
func (*SFExtension) SetContentSize ¶
func (c *SFExtension) SetContentSize(s int)
func (*SFExtension) SetContentType ¶
func (c *SFExtension) SetContentType(ct string)
func (*SFExtension) SetCreatedAt ¶
func (c *SFExtension) SetCreatedAt(ca string)
func (*SFExtension) SetCreatedAtTimestamp ¶
func (c *SFExtension) SetCreatedAtTimestamp(ca int64)
func (*SFExtension) SetDeleted ¶
func (c *SFExtension) SetDeleted(d bool)
func (*SFExtension) SetUUID ¶
func (c *SFExtension) SetUUID(u string)
func (*SFExtension) SetUpdatedAt ¶
func (c *SFExtension) SetUpdatedAt(ca string)
func (*SFExtension) SetUpdatedAtTimestamp ¶
func (c *SFExtension) SetUpdatedAtTimestamp(ca int64)
type SFExtensionContent ¶
type SFExtensionContent struct { ItemReferences ItemReferences `json:"references"` AppData AppDataContent `json:"appData"` Name string `json:"name"` DissociatedItemIds []string `json:"disassociatedItemIds"` AssociatedItemIds []string `json:"associatedItemIds"` Active interface{} `json:"active"` }
func NewSFExtensionContent ¶
func NewSFExtensionContent() *SFExtensionContent
NewSFExtensionContent returns an empty Tag content instance.
func (*SFExtensionContent) AssociateItems ¶
func (cc *SFExtensionContent) AssociateItems(newItems []string)
func (*SFExtensionContent) DisassociateItems ¶
func (cc *SFExtensionContent) DisassociateItems(itemsToRemove []string)
func (*SFExtensionContent) GetActive ¶
func (cc *SFExtensionContent) GetActive() bool
func (*SFExtensionContent) GetAppData ¶
func (cc *SFExtensionContent) GetAppData() AppDataContent
func (*SFExtensionContent) GetItemAssociations ¶
func (cc *SFExtensionContent) GetItemAssociations() []string
func (*SFExtensionContent) GetItemDisassociations ¶
func (cc *SFExtensionContent) GetItemDisassociations() []string
func (*SFExtensionContent) GetName ¶
func (cc *SFExtensionContent) GetName() string
func (SFExtensionContent) GetTitle ¶
func (cc SFExtensionContent) GetTitle() string
func (*SFExtensionContent) GetUpdateTime ¶
func (cc *SFExtensionContent) GetUpdateTime() (time.Time, error)
func (SFExtensionContent) References ¶
func (cc SFExtensionContent) References() ItemReferences
func (*SFExtensionContent) SetAppData ¶
func (cc *SFExtensionContent) SetAppData(data AppDataContent)
func (*SFExtensionContent) SetReferences ¶
func (cc *SFExtensionContent) SetReferences(input ItemReferences)
func (*SFExtensionContent) SetTitle ¶
func (cc *SFExtensionContent) SetTitle(title string)
func (*SFExtensionContent) SetUpdateTime ¶
func (cc *SFExtensionContent) SetUpdateTime(uTime time.Time)
func (*SFExtensionContent) UpsertReferences ¶
func (cc *SFExtensionContent) UpsertReferences(input ItemReferences)
type SFExtensions ¶
type SFExtensions []SFExtension
func (*SFExtensions) DeDupe ¶
func (c *SFExtensions) DeDupe()
func (SFExtensions) Validate ¶
func (c SFExtensions) Validate() error
type SFMFA ¶
type SFMFA struct { ItemCommon Content SFMFAContent }
func (SFMFA) GetContent ¶
func (SFMFA) GetContentSize ¶
func (SFMFA) GetContentType ¶
func (SFMFA) GetCreatedAt ¶
func (SFMFA) GetCreatedAtTimestamp ¶
func (SFMFA) GetDuplicateOf ¶
func (SFMFA) GetItemsKeyID ¶
func (SFMFA) GetUpdatedAt ¶
func (SFMFA) GetUpdatedAtTimestamp ¶
func (*SFMFA) SetContent ¶
func (*SFMFA) SetContentSize ¶
func (*SFMFA) SetContentType ¶
func (*SFMFA) SetCreatedAt ¶
func (*SFMFA) SetCreatedAtTimestamp ¶
func (*SFMFA) SetDeleted ¶
func (*SFMFA) SetUpdatedAt ¶
func (*SFMFA) SetUpdatedAtTimestamp ¶
type SFMFAContent ¶
type SFMFAContent struct { ItemReferences ItemReferences `json:"references"` AppData AppDataContent `json:"appData"` Name string `json:"name"` DissociatedItemIds []string `json:"disassociatedItemIds"` AssociatedItemIds []string `json:"associatedItemIds"` Active interface{} `json:"active"` }
func NewSFMFAContent ¶
func NewSFMFAContent() *SFMFAContent
NewTagContent returns an empty Tag content instance.
func (*SFMFAContent) AssociateItems ¶
func (cc *SFMFAContent) AssociateItems(newItems []string)
func (*SFMFAContent) DisassociateItems ¶
func (cc *SFMFAContent) DisassociateItems(itemsToRemove []string)
func (*SFMFAContent) GetActive ¶
func (cc *SFMFAContent) GetActive() bool
func (*SFMFAContent) GetAppData ¶
func (cc *SFMFAContent) GetAppData() AppDataContent
func (*SFMFAContent) GetItemAssociations ¶
func (cc *SFMFAContent) GetItemAssociations() []string
func (*SFMFAContent) GetItemDisassociations ¶
func (cc *SFMFAContent) GetItemDisassociations() []string
func (*SFMFAContent) GetName ¶
func (cc *SFMFAContent) GetName() string
func (SFMFAContent) GetTitle ¶
func (cc SFMFAContent) GetTitle() string
func (*SFMFAContent) GetUpdateTime ¶
func (cc *SFMFAContent) GetUpdateTime() (time.Time, error)
func (SFMFAContent) References ¶
func (cc SFMFAContent) References() ItemReferences
func (*SFMFAContent) SetAppData ¶
func (cc *SFMFAContent) SetAppData(data AppDataContent)
func (*SFMFAContent) SetReferences ¶
func (cc *SFMFAContent) SetReferences(input ItemReferences)
func (*SFMFAContent) SetTitle ¶
func (cc *SFMFAContent) SetTitle(title string)
func (*SFMFAContent) SetUpdateTime ¶
func (cc *SFMFAContent) SetUpdateTime(uTime time.Time)
func (*SFMFAContent) UpsertReferences ¶
func (cc *SFMFAContent) UpsertReferences(input ItemReferences)
type SmartTag ¶
type SmartTag struct { ItemCommon Content SmartTagContent }
func NewSmartTag ¶
func NewSmartTag() SmartTag
NewSmartTag returns an Item of type SmartTag without content.
func (SmartTag) GetContent ¶
func (SmartTag) GetContentSize ¶
func (SmartTag) GetContentType ¶
func (SmartTag) GetCreatedAt ¶
func (SmartTag) GetCreatedAtTimestamp ¶
func (SmartTag) GetDuplicateOf ¶
func (SmartTag) GetItemsKeyID ¶
func (SmartTag) GetUpdatedAt ¶
func (SmartTag) GetUpdatedAtTimestamp ¶
func (*SmartTag) SetContent ¶
func (*SmartTag) SetContentSize ¶
func (*SmartTag) SetContentType ¶
func (*SmartTag) SetCreatedAt ¶
func (*SmartTag) SetCreatedAtTimestamp ¶
func (*SmartTag) SetDeleted ¶
func (*SmartTag) SetUpdatedAt ¶
func (*SmartTag) SetUpdatedAtTimestamp ¶
type SmartTagContent ¶
type SmartTagContent struct { ItemReferences ItemReferences `json:"references"` AppData AppDataContent `json:"appData"` Name string `json:"name"` DissociatedItemIds []string `json:"disassociatedItemIds"` AssociatedItemIds []string `json:"associatedItemIds"` Active interface{} `json:"active"` }
func NewSmartTagContent ¶
func NewSmartTagContent() *SmartTagContent
NewTagContent returns an empty Tag content instance.
func (*SmartTagContent) AssociateItems ¶
func (cc *SmartTagContent) AssociateItems(newItems []string)
func (*SmartTagContent) DisassociateItems ¶
func (cc *SmartTagContent) DisassociateItems(itemsToRemove []string)
func (*SmartTagContent) GetActive ¶
func (cc *SmartTagContent) GetActive() bool
func (*SmartTagContent) GetAppData ¶
func (cc *SmartTagContent) GetAppData() AppDataContent
func (*SmartTagContent) GetItemAssociations ¶
func (cc *SmartTagContent) GetItemAssociations() []string
func (*SmartTagContent) GetItemDisassociations ¶
func (cc *SmartTagContent) GetItemDisassociations() []string
func (*SmartTagContent) GetName ¶
func (cc *SmartTagContent) GetName() string
func (SmartTagContent) GetTitle ¶
func (cc SmartTagContent) GetTitle() string
func (*SmartTagContent) GetUpdateTime ¶
func (cc *SmartTagContent) GetUpdateTime() (time.Time, error)
func (SmartTagContent) References ¶
func (cc SmartTagContent) References() ItemReferences
func (*SmartTagContent) SetAppData ¶
func (cc *SmartTagContent) SetAppData(data AppDataContent)
func (*SmartTagContent) SetReferences ¶
func (cc *SmartTagContent) SetReferences(input ItemReferences)
func (*SmartTagContent) SetTitle ¶
func (cc *SmartTagContent) SetTitle(title string)
func (*SmartTagContent) SetUpdateTime ¶
func (cc *SmartTagContent) SetUpdateTime(uTime time.Time)
func (*SmartTagContent) UpsertReferences ¶
func (cc *SmartTagContent) UpsertReferences(input ItemReferences)
type SyncInput ¶
type SyncInput struct { Session *session.Session SyncToken string CursorToken string Items EncryptedItems NextItem int // the next item to put OutType string PageSize int // override default number of items to request with each sync call PostSyncRequestDelay int64 // milliseconds to sleep after sync request }
SyncInput defines the input for retrieving items.
type SyncOutput ¶
type SyncOutput struct { Items EncryptedItems // items new or modified since last sync SavedItems EncryptedItems // dirty items needing resolution Unsaved EncryptedItems // items not saved during sync TODO: No longer needed? Replaced by Conflicts? Conflicts ConflictedItems // items not saved during sync due to significant difference in updated_time values. can be triggered by import where the server item has been updated since export. SyncToken string Cursor string }
SyncOutput defines the output from retrieving items It contains slices of items based on their state see: https://standardfile.org/ for state details
func Sync ¶
func Sync(input SyncInput) (output SyncOutput, err error)
Sync retrieves items from the API using optional filters and updates the provided session with the items keys required to encrypt and decrypt items.
type Tag ¶
type Tag struct { ItemCommon Content TagContent }
func NewTag ¶
func NewTag(title string, refs ItemReferences) (tag Tag, err error)
NewTag returns an Item of type Tag without content.
func (Tag) GetContent ¶
func (Tag) GetContentSize ¶
func (Tag) GetContentType ¶
func (Tag) GetCreatedAt ¶
func (Tag) GetCreatedAtTimestamp ¶
func (Tag) GetDuplicateOf ¶
func (Tag) GetItemsKeyID ¶
func (Tag) GetUpdatedAt ¶
func (Tag) GetUpdatedAtTimestamp ¶
func (*Tag) SetContent ¶
func (*Tag) SetContentSize ¶
func (*Tag) SetContentType ¶
func (*Tag) SetCreatedAt ¶
func (*Tag) SetCreatedAtTimestamp ¶
func (*Tag) SetDeleted ¶
func (*Tag) SetUpdatedAt ¶
func (*Tag) SetUpdatedAtTimestamp ¶
type TagContent ¶
type TagContent struct { Title string `json:"title"` ItemReferences ItemReferences `json:"references"` AppData AppDataContent `json:"appData"` }
func NewTagContent ¶
func NewTagContent() *TagContent
NewTagContent returns an empty Tag content instance.
func (*TagContent) AssociateItems ¶
func (tagContent *TagContent) AssociateItems(newItems []string)
func (TagContent) Copy ¶
func (tagContent TagContent) Copy() TagContent
func (*TagContent) DisassociateItems ¶
func (tagContent *TagContent) DisassociateItems(newItems []string)
func (TagContent) Equals ¶
func (tagContent TagContent) Equals(e TagContent) bool
func (*TagContent) GetActive ¶
func (tagContent *TagContent) GetActive() bool
func (*TagContent) GetAppData ¶
func (tagContent *TagContent) GetAppData() AppDataContent
func (*TagContent) GetItemAssociations ¶
func (tagContent *TagContent) GetItemAssociations() []string
func (*TagContent) GetItemDisassociations ¶
func (tagContent *TagContent) GetItemDisassociations() []string
func (*TagContent) GetName ¶
func (tagContent *TagContent) GetName() string
func (TagContent) GetText ¶
func (tagContent TagContent) GetText() string
func (TagContent) GetTitle ¶
func (tagContent TagContent) GetTitle() string
func (*TagContent) GetUpdateTime ¶
func (tagContent *TagContent) GetUpdateTime() (time.Time, error)
func (TagContent) MarshalJSON ¶
func (tagContent TagContent) MarshalJSON() ([]byte, error)
func (TagContent) References ¶
func (tagContent TagContent) References() ItemReferences
func (*TagContent) SetAppData ¶
func (tagContent *TagContent) SetAppData(data AppDataContent)
func (*TagContent) SetReferences ¶
func (tagContent *TagContent) SetReferences(newRefs ItemReferences)
func (*TagContent) SetText ¶
func (tagContent *TagContent) SetText(text string)
func (*TagContent) SetTitle ¶
func (tagContent *TagContent) SetTitle(title string)
func (*TagContent) SetUpdateTime ¶
func (tagContent *TagContent) SetUpdateTime(uTime time.Time)
func (*TagContent) TextContains ¶
func (tagContent *TagContent) TextContains(findString string, matchCase bool) bool
func (*TagContent) UpsertReferences ¶
func (tagContent *TagContent) UpsertReferences(newRefs ItemReferences)
type Tasklist ¶
type Tasklist struct { UUID string `json:"-"` Duplicates []Tasklist `json:"-"` Title string `json:"-"` Tasks []Task UpdatedAt time.Time `json:"updatedAt"` Trashed bool `json:"trashed"` }
func (*Tasklist) CompleteTask ¶
func (*Tasklist) DeleteTask ¶
func (*Tasklist) ReopenTask ¶
type Theme ¶
type Theme struct { ItemCommon Content ThemeContent }
func (Theme) GetContent ¶
func (Theme) GetContentSize ¶
func (Theme) GetContentType ¶
func (Theme) GetCreatedAt ¶
func (Theme) GetCreatedAtTimestamp ¶
func (Theme) GetDuplicateOf ¶
func (Theme) GetItemsKeyID ¶
func (Theme) GetUpdatedAt ¶
func (Theme) GetUpdatedAtTimestamp ¶
func (*Theme) SetContent ¶
func (*Theme) SetContentSize ¶
func (*Theme) SetContentType ¶
func (*Theme) SetCreatedAt ¶
func (*Theme) SetCreatedAtTimestamp ¶
func (*Theme) SetDeleted ¶
func (*Theme) SetUpdatedAt ¶
func (*Theme) SetUpdatedAtTimestamp ¶
type ThemeContent ¶
type ThemeContent struct { HostedURL string `json:"hosted_url"` LocalURL string `json:"local_url"` PackageInfo json.RawMessage `json:"package_info"` ValidUntil string `json:"valid_until"` ItemReferences ItemReferences `json:"references"` AppData AppDataContent `json:"appData"` Name string `json:"name"` DissociatedItemIds []string `json:"disassociatedItemIds"` AssociatedItemIds []string `json:"associatedItemIds"` Active interface{} `json:"active"` }
func NewThemeContent ¶
func NewThemeContent() *ThemeContent
NewTagContent returns an empty Tag content instance.
func (*ThemeContent) AssociateItems ¶
func (cc *ThemeContent) AssociateItems(newItems []string)
func (*ThemeContent) DisassociateItems ¶
func (cc *ThemeContent) DisassociateItems(itemsToRemove []string)
func (*ThemeContent) GetActive ¶
func (cc *ThemeContent) GetActive() bool
func (*ThemeContent) GetAppData ¶
func (cc *ThemeContent) GetAppData() AppDataContent
func (*ThemeContent) GetItemAssociations ¶
func (cc *ThemeContent) GetItemAssociations() []string
func (*ThemeContent) GetItemDisassociations ¶
func (cc *ThemeContent) GetItemDisassociations() []string
func (*ThemeContent) GetName ¶
func (cc *ThemeContent) GetName() string
func (ThemeContent) GetTitle ¶
func (cc ThemeContent) GetTitle() string
func (*ThemeContent) GetUpdateTime ¶
func (cc *ThemeContent) GetUpdateTime() (time.Time, error)
func (ThemeContent) References ¶
func (cc ThemeContent) References() ItemReferences
func (*ThemeContent) SetAppData ¶
func (cc *ThemeContent) SetAppData(data AppDataContent)
func (*ThemeContent) SetReferences ¶
func (cc *ThemeContent) SetReferences(input ItemReferences)
func (*ThemeContent) SetTitle ¶
func (cc *ThemeContent) SetTitle(title string)
func (*ThemeContent) SetUpdateTime ¶
func (cc *ThemeContent) SetUpdateTime(uTime time.Time)
func (*ThemeContent) UpsertReferences ¶
func (cc *ThemeContent) UpsertReferences(input ItemReferences)
type UpdateItemRefsInput ¶
type UpdateItemRefsOutput ¶
type UpdateItemRefsOutput struct {
Items Items // Tags
}
func UpdateItemRefs ¶
func UpdateItemRefs(i UpdateItemRefsInput) UpdateItemRefsOutput
type UserPreferences ¶
type UserPreferences struct { ItemCommon Content UserPreferencesContent }
func NewUserPreferences ¶
func NewUserPreferences() UserPreferences
NewUserPreferences returns an Item of type UserPreferences without content.
func (UserPreferences) GetContent ¶
func (c UserPreferences) GetContent() Content
func (UserPreferences) GetContentSize ¶
func (c UserPreferences) GetContentSize() int
func (UserPreferences) GetContentType ¶
func (c UserPreferences) GetContentType() string
func (UserPreferences) GetCreatedAt ¶
func (c UserPreferences) GetCreatedAt() string
func (UserPreferences) GetCreatedAtTimestamp ¶
func (c UserPreferences) GetCreatedAtTimestamp() int64
func (UserPreferences) GetDuplicateOf ¶
func (c UserPreferences) GetDuplicateOf() string
func (UserPreferences) GetItemsKeyID ¶
func (c UserPreferences) GetItemsKeyID() string
func (UserPreferences) GetUUID ¶
func (c UserPreferences) GetUUID() string
func (UserPreferences) GetUpdatedAt ¶
func (c UserPreferences) GetUpdatedAt() string
func (UserPreferences) GetUpdatedAtTimestamp ¶
func (c UserPreferences) GetUpdatedAtTimestamp() int64
func (UserPreferences) IsDefault ¶
func (c UserPreferences) IsDefault() bool
func (UserPreferences) IsDeleted ¶
func (c UserPreferences) IsDeleted() bool
func (*UserPreferences) SetContent ¶
func (c *UserPreferences) SetContent(cc Content)
func (*UserPreferences) SetContentSize ¶
func (c *UserPreferences) SetContentSize(s int)
func (*UserPreferences) SetContentType ¶
func (c *UserPreferences) SetContentType(ct string)
func (*UserPreferences) SetCreatedAt ¶
func (c *UserPreferences) SetCreatedAt(ca string)
func (*UserPreferences) SetCreatedAtTimestamp ¶
func (c *UserPreferences) SetCreatedAtTimestamp(ca int64)
func (*UserPreferences) SetDeleted ¶
func (c *UserPreferences) SetDeleted(d bool)
func (*UserPreferences) SetUUID ¶
func (c *UserPreferences) SetUUID(u string)
func (*UserPreferences) SetUpdatedAt ¶
func (c *UserPreferences) SetUpdatedAt(ca string)
func (*UserPreferences) SetUpdatedAtTimestamp ¶
func (c *UserPreferences) SetUpdatedAtTimestamp(ca int64)
type UserPreferencesContent ¶
type UserPreferencesContent struct { ItemReferences ItemReferences `json:"references"` AppData AppDataContent `json:"appData"` Name string `json:"name"` DissociatedItemIds []string `json:"disassociatedItemIds"` AssociatedItemIds []string `json:"associatedItemIds"` Active interface{} `json:"active"` }
func NewUserPreferencesContent ¶
func NewUserPreferencesContent() *UserPreferencesContent
NewUserPreferencesContent returns an empty Tag content instance.
func (*UserPreferencesContent) AssociateItems ¶
func (cc *UserPreferencesContent) AssociateItems(newItems []string)
func (*UserPreferencesContent) DisassociateItems ¶
func (cc *UserPreferencesContent) DisassociateItems(itemsToRemove []string)
func (*UserPreferencesContent) GetActive ¶
func (cc *UserPreferencesContent) GetActive() bool
func (*UserPreferencesContent) GetAppData ¶
func (cc *UserPreferencesContent) GetAppData() AppDataContent
func (*UserPreferencesContent) GetItemAssociations ¶
func (cc *UserPreferencesContent) GetItemAssociations() []string
func (*UserPreferencesContent) GetItemDisassociations ¶
func (cc *UserPreferencesContent) GetItemDisassociations() []string
func (*UserPreferencesContent) GetName ¶
func (cc *UserPreferencesContent) GetName() string
func (UserPreferencesContent) GetTitle ¶
func (cc UserPreferencesContent) GetTitle() string
func (*UserPreferencesContent) GetUpdateTime ¶
func (cc *UserPreferencesContent) GetUpdateTime() (time.Time, error)
func (UserPreferencesContent) References ¶
func (cc UserPreferencesContent) References() ItemReferences
func (*UserPreferencesContent) SetAppData ¶
func (cc *UserPreferencesContent) SetAppData(data AppDataContent)
func (*UserPreferencesContent) SetReferences ¶
func (cc *UserPreferencesContent) SetReferences(input ItemReferences)
func (*UserPreferencesContent) SetTitle ¶
func (cc *UserPreferencesContent) SetTitle(title string)
func (*UserPreferencesContent) SetUpdateTime ¶
func (cc *UserPreferencesContent) SetUpdateTime(uTime time.Time)
func (*UserPreferencesContent) UpsertReferences ¶
func (cc *UserPreferencesContent) UpsertReferences(input ItemReferences)
type UserPreferencess ¶
type UserPreferencess []UserPreferences
func (*UserPreferencess) DeDupe ¶
func (c *UserPreferencess) DeDupe()
func (UserPreferencess) Validate ¶
func (c UserPreferencess) Validate() error
Source Files ¶
- advancedChecklist.go
- checklist.go
- component.go
- extension.go
- extensionRepo.go
- file.go
- fileSafeCredentials.go
- fileSafeFileMetadata.go
- fileSafeIntegration.go
- filter.go
- item.go
- itemDecryption.go
- itemEncryption.go
- items.go
- itemsKey.go
- note.go
- privileges.go
- sfExtension.go
- sfMFA.go
- smartTag.go
- sync.go
- tag.go
- theme.go
- userPreferences.go
- validation.go