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: 6 Imported by: 0

Documentation

Overview

Package mock provides mocks for keychain token storage.

Index

Constants

This section is empty.

Variables

View Source
var NoMock = Mock()

NoMock is no mock Storage.

Functions

This section is empty.

Types

type Mocker

type Mocker func(tb testing.TB) *Storage

Mocker is Storage mocker.

func Mock

func Mock(mocks ...func(s *Storage)) Mocker

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

type Storage

type Storage struct {
	testifyMock.Mock
}

Storage is a token.KeychainStorage.

func (*Storage) Delete

func (s *Storage) Delete(ctx context.Context, key string) error

Delete satisfies token.KeychainStorage.

func (*Storage) Get

func (s *Storage) Get(ctx context.Context, key string) (auth.OAuthToken, error)

Get satisfies token.KeychainStorage.

func (*Storage) Set

func (s *Storage) Set(ctx context.Context, key string, token auth.OAuthToken) error

Set satisfies token.KeychainStorage.

Jump to

Keyboard shortcuts

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