Documentation ¶
Index ¶
- Constants
- Variables
- func ParseSessionString(in string) (email string, session gosn.Session, err error)
- func StringInSlice(inStr string, inSlice []string, matchCase bool) bool
- func WipeDotfileTagsAndNotes(session *cache.Session, pageSize int, useStdErr bool) (int, error)
- type AddInput
- type AddOutput
- type GetNoteConfig
- type ItemDiff
- type RemoveInput
- type RemoveOutput
- type SNDotfilesSyncInput
- type SyncOutput
Constants ¶
View Source
const ( // SNServerURL defines the default URL for making calls to syncDBwithFS with SN SNServerURL = "https://syncDBwithFS.standardnotes.org" // DotFilesTag defines the default tag that all SN Dotfiles will be prefixed with DotFilesTag = "dotfiles" // DefaultPageSize defines the number of items to attempt to syncDBwithFS per request DefaultPageSize = 500 // SpinnerCharSet defines the characters to use for the spinner shown when syncing SpinnerCharSet = 14 // SpinnerDelay defines the number of milliseconds to wait between each character in the spinner SpinnerDelay = 100 SNAppName = "sn-dotfiles" )
Variables ¶
View Source
var (
HiWhite = color.New(color.FgHiWhite).SprintFunc()
)
Functions ¶
func ParseSessionString ¶
Types ¶
type AddOutput ¶
type GetNoteConfig ¶
type GetNoteConfig struct { Session cache.Session Filters gosn.ItemFilters NoteTitles []string TagTitles []string TagUUIDs []string PageSize int Debug bool }
GetNoteConfig defines the input for getting notes from SN
type ItemDiff ¶
type ItemDiff struct {
// contains filtered or unexported fields
}
func Status ¶
func Status(session *cache.Session, home string, paths []string, pageSize int, debug bool, useStdErr bool) (diffs []ItemDiff, msg string, err error)
Status compares and then outputs status of all items (or a subset defined by Paths param): - local items that missing - local items that are newer - remote items that are newer - local items that are untracked (if Paths specified) - identical local and remote items
type RemoveInput ¶
type RemoveOutput ¶
func Remove ¶
func Remove(ri RemoveInput, useStdErr bool) (ro RemoveOutput, err error)
Remove stops tracking local Paths by removing the related notes from SN
type SNDotfilesSyncInput ¶
type SyncOutput ¶
func Sync ¶
func Sync(si SNDotfilesSyncInput, useStdErr bool) (so SyncOutput, err error)
Sync compares local and remote items and then: - pulls remotes if locals are older or missing - pushes locals if remotes are newer
Click to show internal directories.
Click to hide internal directories.