Documentation ¶
Index ¶
- Variables
- func CleanUp()
- func DebugMode()
- func EraseAll()
- func EraseConfig()
- func HashPasswordSlow(password string) (string, error)
- type Entry
- type Fs
- func (ssed *Fs) Close() error
- func (ssed *Fs) DeleteDocument(documentName string)
- func (ssed *Fs) DeleteEntry(documentName, entryName string)
- func (ssed *Fs) DumpAll() (string, error)
- func (ssed *Fs) GetDocument(documentName string) []Entry
- func (ssed *Fs) GetDocumentOrEntry(ambiguous string) ([]Entry, bool, string, error)
- func (ssed *Fs) GetEntry(documentName, entryName string) (Entry, error)
- func (ssed *Fs) GetPasswordFromPin(pin string) (string, error)
- func (ssed *Fs) HasPinFile() bool
- func (ssed *Fs) Import(filename string) error
- func (ssed *Fs) Init(username, method string) error
- func (ssed *Fs) ListDocuments() []string
- func (ssed *Fs) ListEntries() []string
- func (ssed *Fs) Open(password string) error
- func (ssed *Fs) ReturnMethod() string
- func (ssed *Fs) ReturnUser() string
- func (ssed *Fs) SetMethod(method string) error
- func (ssed *Fs) SetPinFromPassword(pin string) error
- func (ssed *Fs) Update(text, documentName, entryName, timestamp string) error
Constants ¶
This section is empty.
Variables ¶
var LocalFolder string
var PathToTempFolder string
PathToTempFolder is the path to the temporary folder created by ssed
var RemoteFolder string
Functions ¶
func EraseConfig ¶
func EraseConfig()
EraseConfig erases the folder containing ssed configuration files
func HashPasswordSlow ¶
HashPasswordSlow generates a bcrypt hash of the password using work factor 1048576.
Types ¶
type Entry ¶
type Entry struct { Text string `json:"text"` Timestamp string `json:"timestamp"` ModifiedTimestamp string `json:"modified_timestamp"` Document string `json:"document"` Entry string `json:"entry"` // contains filtered or unexported fields }
Entry is the fundamental unit of an entry in any document
func GetBlankEntries ¶
func GetBlankEntries() []Entry
GetBlankEntries returns an empty slice of entries
type Fs ¶
type Fs struct {
// contains filtered or unexported fields
}
Fs is the filesystem for ssed
func (*Fs) DeleteDocument ¶
DeleteDocument will simply Update("ignore document",documentName,entryName,"")
func (*Fs) DeleteEntry ¶
DeleteEntry will simply Update("ignore-entry",documentName,entryName,"")
func (*Fs) GetDocument ¶
GetDocument returns a slice of all entries in that document
func (*Fs) GetDocumentOrEntry ¶
GetDocumentOrEntry returns a entry slice that is either the entry or all entries in a document this is a useful function if you don't know whether an input is a document or an entry
func (*Fs) GetPasswordFromPin ¶
GetPasswordFromPin allows to use a pin
func (*Fs) Init ¶
Init initializes the repo If the username and the method are left blank it will automatically use first found in the config file
func (*Fs) ListDocuments ¶
ListDocuments lists all documents available
func (*Fs) ListEntries ¶
ListEntries returns slice of all the entries in all documents
func (*Fs) ReturnMethod ¶
ReturnMethod returns the current method being used
func (*Fs) ReturnUser ¶
ReturnUser returns the current user being used
func (*Fs) SetPinFromPassword ¶
SetPinFromPassword allows to use a pin