local

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Store implements the store.Store interface for local storage.

func Open

func Open(conf config.LocalStorageConfig) (store *Store, err error)

Open the local storage backend.

func (*Store) Close

func (s *Store) Close() error

Close the local storage backend.

func (*Store) GetCertificate

func (s *Store) GetCertificate(ctx context.Context, name string) (cert []byte, err error)

GetCertificate retrieves certificate data by id from the local storage backend.

func (*Store) GetPassword

func (s *Store) GetPassword(ctx context.Context, id string) (password []byte, err error)

GetPassword retrieves a password by id from the local storage backend.

func (*Store) UpdateCertificate

func (s *Store) UpdateCertificate(ctx context.Context, name string, cert []byte) (err error)

UpdateCertificate updates certificate data in the local storage backend.

func (*Store) UpdatePassword

func (s *Store) UpdatePassword(ctx context.Context, id string, password []byte) (err error)

UpdatePassword updates a password by id in the local storage backend. If the password does not exist, it is created. Otherwise, it is overwritten.

Jump to

Keyboard shortcuts

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