Versions in this module Expand all Collapse all v4 v4.0.0 Oct 5, 2026 Changes in this version + const Separator + var ErrActionNotFound = errors.New("action not found") + var ErrDraftNotFound = errors.New("draft not found") + var ErrWorkspaceNotFound = errors.New("workspace not found") + func ActionExists(name string) (bool, error) + func Active() (string, error) + func Append(uuid, text string, opt ModifyOptions) error + func Archive(uuid string) error + func Configure(app AppInfo, timeout time.Duration) + func Count(query string, filter Filter, opt QueryOptions, workspace string) (int, error) + func Create(text string, opt CreateOptions) (string, error) + func CurrentWorkspace() (string, error) + func DraftExists(uuid string) (bool, error) + func InspectDictionary(data []byte) (map[string]bool, []string, error) + func IsRunning() (bool, error) + func Move(uuid, folder string) error + func OpenWorkspace(name string) error + func PreflightMutation(action, uuid string, flagType *int) error + func Prepend(uuid, text string, opt ModifyOptions) error + func RemoveTags(uuid string, tags ...string) error + func RenameWorkspace(name, newName string) error + func Replace(uuid, text string) error + func ReplaceIfUnchanged(uuid, text, original string) error + func RunActionOnDraft(action, uuid string) error + func Select(uuid string) error + func SetFlagType(uuid string, flagType int) error + func SetFlagged(uuid string, flagged bool) error + func Tag(uuid string, tags ...string) error + func Trash(uuid string) error + func ValidateDraft(d Draft) error + func ValidateName(name string) error + func ValidateUUID(uuid string) error + func WorkspaceExists(name string) (bool, error) + func Workspaces() ([]string, error) + type ActionRunResult struct + CreatedDraft bool + Status string + UUID string + func RunAction(action, text string) (ActionRunResult, error) + type AppInfo struct + Build string + BundleID string + Capabilities map[string]bool + Channel string + Path string + Version string + Warnings []string + func DiscoverApps() ([]AppInfo, error) + func InspectApp(path string) (AppInfo, error) + func SelectApp(apps []AppInfo, selector, channel string) (AppInfo, error) + type CreateOptions struct + Action string + FlagType *int + Flagged bool + Folder Folder + Tags []string + type Draft struct + AccessedAt string + Content string + CreatedAt string + CreatedLatitude float64 + CreatedLongitude float64 + FlagType *int + Folder string + IsArchived bool + IsFlagged bool + IsTrashed bool + ModifiedAt string + ModifiedLatitude float64 + ModifiedLongitude float64 + Permalink string + Tags []string + Title string + UUID string + func Get(uuid string) (Draft, error) + func Query(query string, filter Filter, opt QueryOptions) ([]Draft, error) + func QueryWorkspace(workspace, query string, filter Filter, opt QueryOptions) ([]Draft, error) + type Error struct + AppleScriptCode int + Cause error + Code string + Completed []string + Hint string + Message string + RetrySafe bool + UUID string + func (e *Error) Error() string + func (e *Error) Unwrap() error + type Filter int + const FilterAll + const FilterArchive + const FilterFlagged + const FilterInbox + const FilterTrash + func (f Filter) String() string + type Folder int + const FolderArchive + const FolderInbox + func (f Folder) String() string + type ModifyOptions struct + Action string + Separator *string + Tags []string + type NamedResource struct + ID string + Name string + Permalink string + func Actions() ([]NamedResource, error) + func Resources(kind string) ([]NamedResource, error) + func Tags() ([]NamedResource, error) + type QueryOptions struct + CreatedAfter string + CreatedBefore string + FlagType *int + Full bool + Limit int + ModifiedAfter string + ModifiedBefore string + OmitTags []string + Sort Sort + SortDescending bool + SortFlaggedToTop bool + Tags []string + type Sort int + const SortAccessed + const SortCreated + const SortModified + func (s Sort) String() string