Documentation
¶
Index ¶
- Constants
- func AddSession(snServer, inKey string, k keyring.Keyring, debug bool) (res string, err error)
- func Decrypt(key []byte, cryptoText string) (pt string, err error)
- func DecryptCipherText(cipherText, rawKey, nonce, rawAuthenticatedData string) (result []byte, err error)
- func DeleteContent(session *Session, everything bool) (deleted int, err error)
- func Encrypt(key []byte, text string) string
- func GenUUID() string
- func GetCredentials(inServer string) (email, password, apiServer, errMsg string)
- func GetSessionFromKeyring(k keyring.Keyring) (s string, err error)
- func IsEncryptedType(ct string) bool
- func RemoveSession(k keyring.Keyring) string
- func SessionExists(k keyring.Keyring) error
- func SessionStatus(sKey string, k keyring.Keyring) (msg string, err error)
- 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) 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 EIT
- type EncItemKey
- type EncryptedItem
- func EncryptItem(item Item, ik ItemsKey, session *Session) (encryptedItem EncryptedItem, err error)
- func EncryptItemsKey(ik ItemsKey, s *Session, new bool) (encryptedItem EncryptedItem, err error)
- func ReEncryptItem(ei EncryptedItem, decryptionItemsKey ItemsKey, newItemsKey ItemsKey, ...) (o EncryptedItem, err error)
- type EncryptedItemExport
- type EncryptedItems
- func (ei *EncryptedItems) DeDupe()
- func (ei EncryptedItems) DecryptAndParse(s *Session) (o Items, err error)
- func (ei EncryptedItems) DecryptAndParseItemsKeys(mk string, debug bool) (o []ItemsKey, err error)
- func (ei EncryptedItems) ReEncrypt(s *Session, decryptionItemsKey ItemsKey, newItemsKey ItemsKey, ...) (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) 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) 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 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) 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) 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) 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 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, ik ItemsKey) (e EncryptedItems, err error)
- func (i Items) Extension() (c Extensions)
- func (i Items) ExtensionRepo() (c ExtensionRepos)
- 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) 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) UserPreferences() (c UserPreferencess)
- func (i Items) Validate() error
- type ItemsKey
- type ItemsKeyContent
- type ItemsKeyEncKey
- type ItemsKeys
- type KeyParams
- type MinimalSession
- 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 (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) 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) 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 RegisterInput
- 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) 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) 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 Session
- func CliSignIn(email, password, apiServer string, debug bool) (session Session, err error)
- func GetSession(loadSession bool, sessionKey, server string, debug bool) (session Session, email string, err error)
- func GetSessionFromUser(server string, debug bool) (Session, string, error)
- func ParseSessionString(ss string) (sess Session, err error)
- type SignInInput
- type SignInOutput
- 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) 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 (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 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) 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) 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 ( // KeySize is the size of the key used by this AEAD, in bytes. KeySize = 32 // NonceSizeX is the size of the nonce used with the XChaCha20-Poly1305 // variant of this AEAD, in bytes. NonceSizeX = 24 SaltSize = 16 )
const ( // PageSize is the maximum number of items to return with each call. PageSize = 150 // LOGGING. LibName = "gosn-v2" // name of library used in logging )
const ( SNServerURL = "https://api.standardnotes.com" KeyringApplicationName = "Session" KeyringService = "StandardNotesCLI" MsgSessionRemovalSuccess = "session removed successfully" MsgSessionRemovalFailure = "failed to remove session" )
Variables ¶
This section is empty.
Functions ¶
func AddSession ¶
func DecryptCipherText ¶
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 GetCredentials ¶
func GetSessionFromKeyring ¶
func IsEncryptedType ¶
func RemoveSession ¶
func RemoveSession(k keyring.Keyring) string
RemoveSession removes the SN Session from the keyring.
func SessionExists ¶
func SessionExists(k keyring.Keyring) error
func SessionStatus ¶
Types ¶
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 FirstItem EncryptedItem FirstItemsKey ItemsKey SecondItem EncryptedItem SecondItemsKey ItemsKey }
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) 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"` 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"` }
func DecryptItem ¶
func DecryptItem(e EncryptedItem, s *Session, iks ItemsKeys) (o DecryptedItem, err error)
func (DecryptedItem) Encrypt ¶
func (di DecryptedItem) Encrypt(ik ItemsKey, session *Session) (encryptedItem EncryptedItem, err error)
type DecryptedItems ¶
type DecryptedItems []DecryptedItem
func DecryptItems ¶
func DecryptItems(s *Session, ei EncryptedItems, iks ItemsKeys) (o DecryptedItems, err error)
DecryptItems.
func (*DecryptedItems) Parse ¶
func (di *DecryptedItems) Parse() (p Items, err error)
func (*DecryptedItems) RemoveDeleted ¶
func (di *DecryptedItems) RemoveDeleted()
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"` }
func EncryptItem ¶
func EncryptItem(item Item, ik ItemsKey, session *Session) (encryptedItem EncryptedItem, err error)
func EncryptItemsKey ¶
func EncryptItemsKey(ik ItemsKey, s *Session, new bool) (encryptedItem EncryptedItem, err error)
func ReEncryptItem ¶
func ReEncryptItem(ei EncryptedItem, decryptionItemsKey ItemsKey, newItemsKey ItemsKey, newMasterKey string, s *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) (o Items, err error)
func (EncryptedItems) DecryptAndParseItemsKeys ¶
func (ei EncryptedItems) DecryptAndParseItemsKeys(mk string, debug bool) (o []ItemsKey, err error)
func (EncryptedItems) ReEncrypt ¶
func (ei EncryptedItems) ReEncrypt(s *Session, decryptionItemsKey ItemsKey, 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 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) 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) 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 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) 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) 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) 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 }
Item defines all types of SN item, e.g. Note, Tag, and Component.
func DecryptAndParseItem ¶
func DecryptAndParseItem(ei EncryptedItem, s *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 CreatedAt string UpdatedAt string CreatedAtTimestamp int64 UpdatedAtTimestamp int64 ContentSize int }
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"` }
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) (o Items, err error)
func (Items) Components ¶
func (i Items) Components() (c Components)
func (*Items) Encrypt ¶
func (i *Items) Encrypt(s *Session, ik ItemsKey) (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) 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 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 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 MinimalSession ¶
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) 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"` 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) 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) 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 RegisterInput ¶
type RegisterInput struct { Password string Email string PWNonce string Version string Origination string Created int64 APIServer string Debug bool }
func (RegisterInput) Register ¶
func (input RegisterInput) Register() (token string, err error)
Register creates a new user token Params: email, password, pw_cost, pw_nonce, version.
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) 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) 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 Session ¶
type Session struct { Debug bool Server string Token string MasterKey string ItemsKeys []ItemsKey // ImporterItemsKeys is the key used to encrypt exported items and set during import only ImporterItemsKeys ItemsKeys DefaultItemsKey ItemsKey KeyParams KeyParams `json:"keyParams"` AccessToken string `json:"access_token"` RefreshToken string `json:"refresh_token"` AccessExpiration int64 `json:"access_expiration"` RefreshExpiration int64 `json:"refresh_expiration"` PasswordNonce string }
Session holds authentication and encryption parameters required to communicate with the API and process transferred data.
func CliSignIn ¶
CliSignIn takes the server URL and credentials and sends them to the API to get a response including an authentication token plus the keys required to encrypt and decrypt SN items.
func GetSession ¶
func GetSessionFromUser ¶
func ParseSessionString ¶
func (Session) CreateItemsKey ¶
func (*Session) Import ¶
func (s *Session) Import(path string, syncToken string, password string) (items EncryptedItems, itemsKey ItemsKey, err error)
Import steps are: - decrypt items in current file (derive master key based on username, password nonce) - create a new items key and reencrypt all items - set items key to be same updatedtimestamp in order to replace existing.
type SignInInput ¶
type SignInOutput ¶
func SignIn ¶
func SignIn(input SignInInput) (output SignInOutput, err error)
SignIn authenticates with the server using credentials and optional MFA in order to obtain the data required to interact with Standard Notes.
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) 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 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) 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 Theme ¶
type Theme struct { ItemCommon Content ThemeContent }
func (Theme) GetContent ¶
func (Theme) GetContentSize ¶
func (Theme) GetContentType ¶
func (Theme) GetCreatedAt ¶
func (Theme) GetCreatedAtTimestamp ¶
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) 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
¶
- authentication.go
- component.go
- encryption.go
- extension.go
- extensionRepo.go
- fileSafeCredentials.go
- fileSafeFileMetadata.go
- fileSafeIntegration.go
- filter.go
- gosn.go
- helpers.go
- item.go
- itemDecryption.go
- itemEncryption.go
- items.go
- itemsKey.go
- note.go
- privileges.go
- session.go
- sfExtension.go
- sfMFA.go
- smartTag.go
- sync.go
- tag.go
- theme.go
- userPreferences.go