Documentation ¶
Index ¶
- type Backup
- type ByName
- type Credential
- type Data
- type FireStore
- func (fs *FireStore) AddCredential(ctx context.Context, name string, credential Credential) error
- func (fs *FireStore) CreateItem(ctx context.Context, item Item) error
- func (fs *FireStore) DeleteCredential(ctx context.Context, item Item, credential Credential) error
- func (fs *FireStore) GetAllItems(ctx context.Context) ([]Item, error)
- func (fs *FireStore) GetItemByIndex(ctx context.Context, index int) (Item, error)
- func (fs *FireStore) GetItemByName(ctx context.Context, name string) (Item, error)
- func (fs *FireStore) SetData(ctx context.Context, data Data) error
- func (fs *FireStore) UpdateItem(ctx context.Context, item Item) error
- type Item
- type LocalStorage
- func (ls *LocalStorage) AddCredential(ctx context.Context, name string, credential Credential) error
- func (ls *LocalStorage) CreateItem(ctx context.Context, website Item) error
- func (ls *LocalStorage) DeleteCredential(ctx context.Context, item Item, credential Credential) error
- func (ls *LocalStorage) GetAllItems(ctx context.Context) ([]Item, error)
- func (ls *LocalStorage) GetItemByIndex(ctx context.Context, index int) (Item, error)
- func (ls *LocalStorage) GetItemByName(ctx context.Context, name string) (Item, error)
- func (ls *LocalStorage) SetData(ctx context.Context, data Data) error
- func (ls *LocalStorage) UpdateItem(ctx context.Context, item Item) error
- type Storage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Credential ¶
type FireStore ¶
type FireStore struct {
// contains filtered or unexported fields
}
func (*FireStore) AddCredential ¶
func (*FireStore) CreateItem ¶ added in v0.2.0
func (*FireStore) DeleteCredential ¶
func (*FireStore) GetAllItems ¶ added in v0.2.0
func (*FireStore) GetItemByIndex ¶ added in v0.2.0
func (*FireStore) GetItemByName ¶ added in v0.2.0
type Item ¶
type Item struct { Name string `json:"name"` Credentials []Credential `json:"credentials"` }
Item structure
func (*Item) GetCredentialByUsername ¶
func (item *Item) GetCredentialByUsername(username string) (Credential, error)
func (*Item) GetCredentialsName ¶
func (*Item) GetUsernameArray ¶
type LocalStorage ¶
type LocalStorage struct {
// contains filtered or unexported fields
}
func NewLocalStorage ¶ added in v0.2.0
func NewLocalStorage() (*LocalStorage, error)
func (*LocalStorage) AddCredential ¶
func (ls *LocalStorage) AddCredential(ctx context.Context, name string, credential Credential) error
func (*LocalStorage) CreateItem ¶ added in v0.2.0
func (ls *LocalStorage) CreateItem(ctx context.Context, website Item) error
Add data
func (*LocalStorage) DeleteCredential ¶
func (ls *LocalStorage) DeleteCredential(ctx context.Context, item Item, credential Credential) error
func (*LocalStorage) GetAllItems ¶ added in v0.2.0
func (ls *LocalStorage) GetAllItems(ctx context.Context) ([]Item, error)
func (*LocalStorage) GetItemByIndex ¶ added in v0.2.0
func (*LocalStorage) GetItemByName ¶ added in v0.2.0
Get item by name
func (*LocalStorage) SetData ¶ added in v0.2.0
func (ls *LocalStorage) SetData(ctx context.Context, data Data) error
func (*LocalStorage) UpdateItem ¶
func (ls *LocalStorage) UpdateItem(ctx context.Context, item Item) error
type Storage ¶
type Storage interface { GetItemByName(context.Context, string) (Item, error) GetItemByIndex(context.Context, int) (Item, error) GetAllItems(context.Context) ([]Item, error) CreateItem(context.Context, Item) error AddCredential(context.Context, string, Credential) error DeleteCredential(context.Context, Item, Credential) error UpdateItem(context.Context, Item) error SetData(context.Context, Data) error }
Storage interface
Click to show internal directories.
Click to hide internal directories.