bolt

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// OwnerTable is the name of the table where store the information's owner.
	OwnerTable = "owner"
	// VaultTable is the name of the table to store the vaults.
	VaultTable = "vault"
	// TagTable is the table's name to store tags.
	TagTable = "tag"
)

Lists of data tables.

Variables

This section is empty.

Functions

func Open

func Open(path, name string) (safe.Service, error)

Open opens the database in the given path. An error occurred if it failed to do it.

Types

type Safe

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

Safe is the BoldDB database.

func (*Safe) Close

func (s *Safe) Close() error

Close closes the connection to database. It implements the io.Closer interface.

func (*Safe) CreateOwner

func (s *Safe) CreateOwner(p *safe.Passphrase) error

CreateOwner implements the safe.OwnerService.

func (*Safe) CreateTag

func (s *Safe) CreateTag(t *safe.Tag) error

CreateTag implements the TagService.

func (*Safe) CreateVault

func (s *Safe) CreateVault(e *safe.Vault) error

CreateVault implements the VaultService interface.

func (*Safe) DeleteTag

func (s *Safe) DeleteTag(key string) error

DeleteTag implements the TagService.

func (*Safe) DeleteVault

func (s *Safe) DeleteVault(key string) error

DeleteVault implements the VaultService interface.

func (*Safe) HasOwner

func (s *Safe) HasOwner() bool

HasOwner implements the safe.OwnerService.

func (*Safe) IsOwner

func (s *Safe) IsOwner(p *safe.Passphrase) bool

IsOwner implements the safe.OwnerService.

func (*Safe) Tags

func (s *Safe) Tags() ([]*safe.Tag, error)

Tags implements the TagService.

func (*Safe) UpdateVault

func (s *Safe) UpdateVault(e *safe.Vault) error

UpdateVault implements the VaultService interface.

func (*Safe) Vault

func (s *Safe) Vault(hash crypto.Hash, key string) (*safe.Vault, error)

Vault implements the VaultService interface.

func (*Safe) Vaults

func (s *Safe) Vaults(hash crypto.Hash, tag *safe.Tag, prefix string) ([]*safe.Vault, error)

Vaults implements the VaultService interface.

Jump to

Keyboard shortcuts

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