Documentation ¶
Index ¶
- type AuthParmas
- type Item
- type Items
- type Session
- func (sess *Session) Decrypt(item *Item) ([]byte, error)
- func (sess *Session) EncryptItem(item *Item) error
- func (sess *Session) GenerateKeys(password string)
- func (sess *Session) NewItem(plainText []byte, contentType string) error
- func (sess *Session) Signin(pw string) error
- func (sess *Session) Sync() (Items, error)
- func (sess *Session) UpdateItem(item Item) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthParmas ¶
type Item ¶
type Item struct { UUID string `json:"uuid"` Content string `json:"content"` ContentType string `json:"content_type"` EncItemKey string `json:"enc_item_key"` AuthHash *string `json:"auth_hash"` CreatedAt string `json:"created_at"` UpdatedAt string `json:"updated_at"` Deleted bool `json:"deleted"` PlanText []byte `json:"-"` }
type Session ¶
type Session struct { Email string JWT string URL string SyncToken *string Auth AuthParmas AddedItems []Item // List off items that has not been synced }
func NewSession ¶
NewSession create a new session
func (*Session) EncryptItem ¶
EncryptItem Encrypt an item with existing EncItemKey
func (*Session) GenerateKeys ¶
GenerateKeys generate login and encryption keys
func (*Session) UpdateItem ¶
UpdateItem Put item in que to be synced
Click to show internal directories.
Click to hide internal directories.