ehr

package
v0.0.0-...-d4bae03 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

type Storage struct {
	// contains filtered or unexported fields
}

func New

func New() *Storage

func (*Storage) Decrypt

func (s *Storage) Decrypt(owner, id string, key []byte) ([]byte, error)

func (*Storage) Encrypt

func (s *Storage) Encrypt(user string, document, key []byte) (string, error)

Encrypt encrypts and saves document to user's storage using key returns ehrID if there is no error. Otherwise returns error

func (*Storage) Exists

func (s *Storage) Exists(user, id string) bool

Exists checks if file exists in docs[user][id]

func (*Storage) Get

func (s *Storage) Get(user string) map[string][]byte

func (*Storage) Getid

func (s *Storage) Getid(user, id string) []byte

func (*Storage) ListIds

func (s *Storage) ListIds(user string) []string

func (*Storage) Reencrypt

func (s *Storage) Reencrypt(owner string, oldkey, newkey []byte) error

Reencrypt reencrypts the whole storage it does NOT upload the data to the api

func (*Storage) RemoveUser

func (s *Storage) RemoveUser(user string)

func (*Storage) Rename

func (s *Storage) Rename(user, id, newid string)

func (*Storage) Save

func (s *Storage) Save(user string, document []byte) string

func (*Storage) Saveid

func (s *Storage) Saveid(user, id string, document []byte)

Jump to

Keyboard shortcuts

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