mock

package
v0.6.0 Latest Latest
Warning

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

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

Documentation

Overview

Package mock provides mocks for keychain credentials provider.

Index

Constants

This section is empty.

Variables

View Source
var NoMock = Mock()

NoMock is no mock KeychainCredentials.

Functions

This section is empty.

Types

type KeychainCredentials

type KeychainCredentials struct {
	testifyMock.Mock
}

KeychainCredentials is a credentials.KeychainCredentials.

func (*KeychainCredentials) Delete

func (p *KeychainCredentials) Delete() error

Delete satisfies credentials.KeychainCredentials.

func (*KeychainCredentials) KeychainCredentials

func (p *KeychainCredentials) KeychainCredentials() credentials.KeychainCredentials

KeychainCredentials satisfies credentials.KeychainCredentialsProvider.

func (*KeychainCredentials) Password

func (p *KeychainCredentials) Password() string

Password satisfies credentials.KeychainCredentials.

func (*KeychainCredentials) Update

func (p *KeychainCredentials) Update(username, password string) error

Update satisfies credentials.KeychainCredentials.

func (*KeychainCredentials) Username

func (p *KeychainCredentials) Username() string

Username satisfies credentials.KeychainCredentials.

type Mocker

type Mocker func(tb testing.TB) *KeychainCredentials

Mocker is KeychainCredentials mocker.

func Mock

func Mock(mocks ...func(p *KeychainCredentials)) Mocker

Mock creates KeychainCredentials 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