local

package
v0.0.0-...-efb7c8a Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAccountNotExists = errors.New("account doesn't exist")
	ErrAccountExists    = errors.New("account already exists")
)
View Source
var ErrNoSecretFound = errors.New("no secrets found with provided id")

Functions

func NewSQLiteStorage

func NewSQLiteStorage(path string, masterPassword []byte) (*sqliteStorage, error)

Types

type Accounts

type Accounts interface {
	CreateAccount(ctx context.Context, secret *pb.Account) (string, error)
	GetAccount(ctx context.Context) (*pb.Account, error)
	UpdateAccount(ctx context.Context, secret *pb.Account) error
	DeleteAccount(ctx context.Context) error
}

type Secrets

type Secrets interface {
	CreateSecret(ctx context.Context, secret *pb.Secret) (string, error)
	ListSecrets(ctx context.Context) ([]*pb.Secret, error)
	GetSecret(ctx context.Context, id string) (*pb.Secret, error)
	UpdateSecret(ctx context.Context, secret *pb.Secret) error
	DeleteSecret(ctx context.Context, secret *pb.Secret) error
}

Jump to

Keyboard shortcuts

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