mock

package
v0.2.0 Latest Latest
Warning

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

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

Documentation

Overview

Package mock provide functionalities for mocking keychain storage.

Index

Constants

This section is empty.

Variables

View Source
var NoMockStorage = MockStorage()

NoMockStorage is no mock Storage.

Functions

This section is empty.

Types

type Storage

type Storage struct {
	mock.Mock
}

Storage is a moneyloverkeychain.Storage.

func (*Storage) Delete

func (s *Storage) Delete(user string) error

Delete satisfies moneyloverkeychain.Storage.

func (*Storage) Get

func (s *Storage) Get(user string) (string, error)

Get satisfies moneyloverkeychain.Storage.

func (*Storage) Set

func (s *Storage) Set(user, password string) error

Set satisfies moneyloverkeychain.Storage.

type StorageMocker

type StorageMocker func(tb testing.TB) *Storage

StorageMocker is Storage mocker.

func MockStorage

func MockStorage(mocks ...func(s *Storage)) StorageMocker

MockStorage creates Storage mock with cleanup to ensure all the expectations are met.

Jump to

Keyboard shortcuts

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