client

package
v0.6.2-0...-436338d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 21, 2021 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Backup

func Backup() error

Backup fetchs all the items and store it in the current directory.

func Login

func Login() error

Login connects to a StandardFile server.

func Logout

func Logout() error

Logout disconnects from a StandardFile server.

func Note

func Note() error

Note runs the text-based StandardNotes application.

func Refresh

func Refresh(client libsf.Client, cfg *Config) error

Refresh refreshes the session if needed.

func Remove

func Remove() error

Remove removes the credential files from the current directory.

func Save

func Save(cfg Config) error

Save stores the configuration in the current folder according to `credentialsfile` const.

func Unseal

func Unseal(filename string) error

Unseal decrypt your backuped notes.

Types

type Config

type Config struct {
	Endpoint    string         `json:"endpoint"`
	Email       string         `json:"email"`
	BearerToken string         `json:"bearer_token"` // JWT used before 20200115
	Session     libsf.Session  `json:"session"`      // Since 20200115
	KeyChain    libsf.KeyChain `json:"keychain"`
}

A Config holds client's configuration.

func Load

func Load() (Config, error)

Load gets the configuration from the current folder according to `credentialsfile` const.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL