Documentation ¶
Index ¶
- Constants
- func CommaSplit(i string) []string
- func DecryptString(input DecryptStringInput) (plaintext string, err error)
- func ItemKeysHealthcheck(input ItemsKeysHealthcheckInput) error
- func OutputSession(input OutputSessionInput) error
- func RemoveDeleted(in items.Items) (out items.Items)
- func Resync(s *cache.Session, cacheDBDir, appName string) error
- func StringInSlice(inStr string, inSlice []string, matchCase bool) bool
- func Sync(si cache.SyncInput, useStdErr bool) (so cache.SyncOutput, err error)
- type AddAdvancedChecklistTaskInput
- type AddNoteInput
- type AddTagsInput
- type AddTagsOutput
- type AddTaskInput
- type AdvancedChecklist
- type AdvancedChecklistGroup
- type AdvancedChecklistSection
- type AdvancedChecklistTask
- type AdvancedChecklistTasks
- type AppDataContentJSON
- type AppDataContentYAML
- type CompleteAdvancedTaskInput
- type CompleteTaskInput
- type CreateItemsKeyInput
- type DecryptStringInput
- type DefaultSection
- type DeleteAdvancedChecklistTaskInput
- type DeleteItemConfig
- type DeleteNoteConfig
- type DeleteTagConfig
- type DeleteTaskInput
- type EncryptedItemExport
- type EncryptedItemsFile
- type ExportConfig
- type GetItemsConfig
- type GetNoteConfig
- type GetSettingsConfig
- type GetTagConfig
- type ImportConfig
- type ItemOrphanedRefs
- type ItemReferenceJSON
- type ItemReferenceYAML
- type ItemsKeysHealthcheckInput
- type ListChecklistsInput
- type ListTasklistsInput
- type NoteContentJSON
- type NoteContentYAML
- type NoteJSON
- type NoteYAML
- type OrgStandardNotesSNComponentsDetailJSON
- type OrgStandardNotesSNDetailJSON
- type OrgStandardNotesSNDetailYAML
- type OutputSessionInput
- type RegisterConfig
- type ReopenAdvancedTaskInput
- type ReopenTaskInput
- type SettingContentJSON
- type SettingContentYAML
- type SettingJSON
- type SettingYAML
- type ShowChecklistInput
- type ShowTasklistInput
- type StatsConfig
- type StatsData
- type TagContentJSON
- type TagContentYAML
- type TagItemsConfig
- type TagJSON
- type TagYAML
- type TestDataCreateNotesConfig
- type TestDataCreateTagsConfig
- type WipeConfig
Constants ¶
View Source
const ( SNServerURL = "https://api.standardnotes.com" SNPageSize = 600 SNAppName = "sn-cli" MinPasswordLength = 8 )
Variables ¶
This section is empty.
Functions ¶
func CommaSplit ¶
func DecryptString ¶
func DecryptString(input DecryptStringInput) (plaintext string, err error)
func ItemKeysHealthcheck ¶
func ItemKeysHealthcheck(input ItemsKeysHealthcheckInput) error
func OutputSession ¶
func OutputSession(input OutputSessionInput) error
Types ¶
type AddAdvancedChecklistTaskInput ¶
type AddAdvancedChecklistTaskInput struct { Session *cache.Session Debug bool UUID string Title string Group string Tasklist string }
func (*AddAdvancedChecklistTaskInput) Run ¶
func (ci *AddAdvancedChecklistTaskInput) Run() (err error)
type AddNoteInput ¶
type AddNoteInput struct { Session *cache.Session Title string Text string FilePath string Tags []string Replace bool Debug bool }
func (*AddNoteInput) Run ¶
func (i *AddNoteInput) Run() error
type AddTagsInput ¶
type AddTagsInput struct { Session *cache.Session Tags []string Parent string ParentUUID string Debug bool Replace bool }
func (*AddTagsInput) Run ¶
func (i *AddTagsInput) Run() (output AddTagsOutput, err error)
type AddTagsOutput ¶
type AddTagsOutput struct {
Added, Existing []string
}
type AddTaskInput ¶
type AddTaskInput struct { Session *cache.Session Debug bool Title string UUID string Tasklist string }
func (*AddTaskInput) Run ¶
func (ci *AddTaskInput) Run() (err error)
type AdvancedChecklist ¶
type AdvancedChecklist struct { UUID string `json:"-"` Duplicates []AdvancedChecklist `json:"-"` Title string `json:"-"` SchemaVersion string `json:"schemaVersion"` Groups []AdvancedChecklistGroup `json:"groups"` DefaultSections []DefaultSection `json:"defaultSections"` UpdatedAt time.Time `json:"updatedAt"` Trashed bool `json:"trashed"` }
func (*AdvancedChecklist) Sort ¶
func (c *AdvancedChecklist) Sort()
type AdvancedChecklistGroup ¶
type AdvancedChecklistGroup struct { Name string `json:"name"` LastActive time.Time `json:"lastActive"` Sections []AdvancedChecklistSection `json:"sections"` Tasks AdvancedChecklistTasks `json:"tasks"` Collapsed bool `json:"collapsed"` }
type AdvancedChecklistTask ¶
type AdvancedChecklistTasks ¶
type AdvancedChecklistTasks []AdvancedChecklistTask
func (*AdvancedChecklistTasks) Sort ¶
func (t *AdvancedChecklistTasks) Sort()
type AppDataContentJSON ¶
type AppDataContentJSON struct { OrgStandardNotesSN OrgStandardNotesSNDetailJSON `json:"org.standardnotes.sn"` OrgStandardNotesSNComponents items.OrgStandardNotesSNComponentsDetail `json:"org.standardnotes.sn.components,omitempty"` }
type AppDataContentYAML ¶
type AppDataContentYAML struct { OrgStandardNotesSN OrgStandardNotesSNDetailYAML `yaml:"org.standardnotes.sn"` OrgStandardNotesSNComponents items.OrgStandardNotesSNComponentsDetail `yaml:"org.standardnotes.sn.components,omitempty"` }
type CompleteAdvancedTaskInput ¶
type CompleteAdvancedTaskInput struct { Session *cache.Session Debug bool Title string Group string Tasklist string UUID string }
func (*CompleteAdvancedTaskInput) Run ¶
func (ci *CompleteAdvancedTaskInput) Run() error
type CompleteTaskInput ¶
type CompleteTaskInput struct { Session *cache.Session Debug bool Title string Tasklist string UUID string }
func (*CompleteTaskInput) Run ¶
func (ci *CompleteTaskInput) Run() (err error)
type CreateItemsKeyInput ¶
type DecryptStringInput ¶
type DefaultSection ¶
type DeleteAdvancedChecklistTaskInput ¶
type DeleteAdvancedChecklistTaskInput struct { Session *cache.Session Debug bool Title string Group string Checklist string UUID string }
func (*DeleteAdvancedChecklistTaskInput) Run ¶
func (ci *DeleteAdvancedChecklistTaskInput) Run() (err error)
type DeleteItemConfig ¶
type DeleteItemConfig struct { Session *cache.Session NoteTitles []string NoteText string ItemsUUIDs []string Regex bool Debug bool }
func (*DeleteItemConfig) Run ¶
func (i *DeleteItemConfig) Run() (noDeleted int, err error)
type DeleteNoteConfig ¶
type DeleteNoteConfig struct { Session *cache.Session NoteTitles []string NoteText string NoteUUIDs []string Regex bool Debug bool }
func (*DeleteNoteConfig) Run ¶
func (i *DeleteNoteConfig) Run() (int, error)
type DeleteTagConfig ¶
type DeleteTagConfig struct { Session *cache.Session Email string TagTitles []string TagUUIDs []string Regex bool Debug bool }
func (*DeleteTagConfig) Run ¶
func (i *DeleteTagConfig) Run() (noDeleted int, err error)
type DeleteTaskInput ¶
type DeleteTaskInput struct { Session *cache.Session Debug bool Title string Tasklist string UUID string }
func (*DeleteTaskInput) Run ¶
func (ci *DeleteTaskInput) Run() (err error)
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 EncryptedItemsFile ¶
type EncryptedItemsFile struct {
Items items.EncryptedItems `json:"items"`
}
type ExportConfig ¶
type GetItemsConfig ¶
type GetNoteConfig ¶
type GetSettingsConfig ¶
type GetTagConfig ¶
type ImportConfig ¶
type ItemOrphanedRefs ¶
type ItemReferenceJSON ¶
type ItemReferenceJSON struct { UUID string `json:"uuid"` ContentType string `json:"content_type"` ReferenceType string `json:"reference_type",omitempty` }
func ItemRefsToJSON ¶
func ItemRefsToJSON(irs []items.ItemReference) []ItemReferenceJSON
type ItemReferenceYAML ¶
type ItemReferenceYAML struct { UUID string `yaml:"uuid"` ContentType string `yaml:"content_type"` ReferenceType string `yaml:"reference_type",omitempty` }
func ItemRefsToYaml ¶
func ItemRefsToYaml(irs []items.ItemReference) []ItemReferenceYAML
type ListChecklistsInput ¶
type ListTasklistsInput ¶
func (*ListTasklistsInput) Run ¶
func (ci *ListTasklistsInput) Run() error
type NoteContentJSON ¶
type NoteContentJSON struct { Title string `json:"title"` Text string `json:"text"` ItemReferences []ItemReferenceJSON `json:"references"` AppData AppDataContentJSON `json:"appData"` EditorIdentifier string `json:"editorIdentifier"` PreviewPlain string `json:"preview_plain"` PreviewHtml string `json:"preview_html"` Spellcheck bool `json:"spellcheck"` Trashed *bool `json:"trashed,omitempty"` }
type NoteContentYAML ¶
type NoteContentYAML struct { Title string `yaml:"title"` Text string `json:"text"` ItemReferences []ItemReferenceYAML `yaml:"references"` AppData AppDataContentYAML `yaml:"appData"` EditorIdentifier string `yaml:"editorIdentifier"` PreviewPlain string `yaml:"preview_plain"` PreviewHtml string `yaml:"preview_html"` Spellcheck bool `yaml:"spellcheck"` Trashed *bool `yaml:"trashed,omitempty"` }
type NoteJSON ¶
type NoteJSON struct { UUID string `json:"uuid"` Content NoteContentJSON `json:"content"` ContentType string `json:"content_type"` CreatedAt string `json:"created_at"` UpdatedAt string `json:"updated_at"` }
type NoteYAML ¶
type NoteYAML struct { UUID string `yaml:"uuid"` Content NoteContentYAML `yaml:"content"` ContentType string `yaml:"content_type"` CreatedAt string `yaml:"created_at"` UpdatedAt string `yaml:"updated_at"` }
type OrgStandardNotesSNComponentsDetailJSON ¶
type OrgStandardNotesSNComponentsDetailJSON map[string]interface{}
type OrgStandardNotesSNDetailYAML ¶
type OrgStandardNotesSNDetailYAML struct {
ClientUpdatedAt string `yaml:"client_updated_at"`
}
type OutputSessionInput ¶
type RegisterConfig ¶
func (*RegisterConfig) Run ¶
func (i *RegisterConfig) Run() error
type ReopenAdvancedTaskInput ¶
type ReopenAdvancedTaskInput struct { Session *cache.Session Debug bool UUID string Title string Group string Tasklist string }
func (*ReopenAdvancedTaskInput) Run ¶
func (ci *ReopenAdvancedTaskInput) Run() error
type ReopenTaskInput ¶
type ReopenTaskInput struct { Session *cache.Session Debug bool UUID string Title string Tasklist string }
func (*ReopenTaskInput) Run ¶
func (ci *ReopenTaskInput) Run() (err error)
type SettingContentJSON ¶
type SettingContentJSON struct { Title string `json:"title"` ItemReferences []ItemReferenceJSON `json:"references"` AppData AppDataContentJSON `json:"appData"` }
type SettingContentYAML ¶
type SettingContentYAML struct { Title string `yaml:"title"` ItemReferences []ItemReferenceYAML `yaml:"references"` AppData AppDataContentYAML `yaml:"appData"` }
type SettingJSON ¶
type SettingJSON struct { UUID string `json:"uuid"` Content SettingContentJSON `json:"content"` ContentType string `json:"content_type"` CreatedAt string `json:"created_at"` UpdatedAt string `json:"updated_at"` }
type SettingYAML ¶
type SettingYAML struct { UUID string `yaml:"uuid"` Content SettingContentYAML `yaml:"content"` ContentType string `yaml:"content_type"` CreatedAt string `yaml:"created_at"` UpdatedAt string `yaml:"updated_at"` }
type ShowChecklistInput ¶
type ShowTasklistInput ¶
type ShowTasklistInput struct { Session *cache.Session Debug bool Group string Title string UUID string ShowCompleted bool Ordering string }
func (*ShowTasklistInput) Run ¶
func (ci *ShowTasklistInput) Run() error
type StatsConfig ¶
func (*StatsConfig) GetData ¶
func (i *StatsConfig) GetData() (StatsData, error)
func (*StatsConfig) Run ¶
func (i *StatsConfig) Run() error
type TagContentJSON ¶
type TagContentJSON struct { Title string `json:"title"` ItemReferences []ItemReferenceJSON `json:"references"` AppData AppDataContentJSON `json:"appData"` }
type TagContentYAML ¶
type TagContentYAML struct { Title string `yaml:"title"` ItemReferences []ItemReferenceYAML `yaml:"references"` AppData AppDataContentYAML `yaml:"appData"` }
type TagItemsConfig ¶
type TagItemsConfig struct { Session *cache.Session FindTitle string FindText string FindTag string NewTags []string Replace bool IgnoreCase bool Debug bool }
func (*TagItemsConfig) Run ¶
func (i *TagItemsConfig) Run() error
type TagJSON ¶
type TagJSON struct { UUID string `json:"uuid"` Content TagContentJSON `json:"content"` ContentType string `json:"content_type"` CreatedAt string `json:"created_at"` UpdatedAt string `json:"updated_at"` }
type TagYAML ¶
type TagYAML struct { UUID string `yaml:"uuid"` Content TagContentYAML `yaml:"content"` ContentType string `yaml:"content_type"` CreatedAt string `yaml:"created_at"` UpdatedAt string `yaml:"updated_at"` }
type TestDataCreateNotesConfig ¶
type TestDataCreateNotesConfig struct { Session cache.Session NumNotes int NumParas int Debug bool }
func (*TestDataCreateNotesConfig) Run ¶
func (i *TestDataCreateNotesConfig) Run() error
type TestDataCreateTagsConfig ¶
func (*TestDataCreateTagsConfig) Run ¶
func (i *TestDataCreateTagsConfig) Run() error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.