keychain

package
v2.0.4 Latest Latest
Warning

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

Go to latest
Published: May 3, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package keychain is a generated GoMock package.

Package keychain is a generated GoMock package.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrGetKeychainItem    = errors.New("failed to get item from keyring")
	ErrRemoveKeychainItem = errors.New("failed to remove item from keyring")
	ErrSetKeychainItem    = errors.New("failed to set item in keyring")
)

Functions

This section is empty.

Types

type Keychain

type Keychain interface {
	Get(key string) ([]byte, error)
	Set(key string, data []byte) error
	Remove(key string) error
}

func NewKeychain

func NewKeychain(args KeychainArgs) Keychain

type KeychainArgs

type KeychainArgs struct {
	Keyring Keyring
}

type Keyring

type Keyring interface {
	Get(key string) (keyring.Item, error)
	Set(item keyring.Item) error
	Remove(key string) error
}

type MockKeychain

type MockKeychain struct {
	// contains filtered or unexported fields
}

MockKeychain is a mock of Keychain interface.

func NewMockKeychain

func NewMockKeychain(ctrl *gomock.Controller) *MockKeychain

NewMockKeychain creates a new mock instance.

func (*MockKeychain) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockKeychain) Get

func (m *MockKeychain) Get(key string) ([]byte, error)

Get mocks base method.

func (*MockKeychain) Remove

func (m *MockKeychain) Remove(key string) error

Remove mocks base method.

func (*MockKeychain) Set

func (m *MockKeychain) Set(key string, data []byte) error

Set mocks base method.

type MockKeychainMockRecorder

type MockKeychainMockRecorder struct {
	// contains filtered or unexported fields
}

MockKeychainMockRecorder is the mock recorder for MockKeychain.

func (*MockKeychainMockRecorder) Get

func (mr *MockKeychainMockRecorder) Get(key interface{}) *gomock.Call

Get indicates an expected call of Get.

func (*MockKeychainMockRecorder) Remove

func (mr *MockKeychainMockRecorder) Remove(key interface{}) *gomock.Call

Remove indicates an expected call of Remove.

func (*MockKeychainMockRecorder) Set

func (mr *MockKeychainMockRecorder) Set(key, data interface{}) *gomock.Call

Set indicates an expected call of Set.

type MockKeyring

type MockKeyring struct {
	// contains filtered or unexported fields
}

MockKeyring is a mock of Keyring interface.

func NewMockKeyring

func NewMockKeyring(ctrl *gomock.Controller) *MockKeyring

NewMockKeyring creates a new mock instance.

func (*MockKeyring) EXPECT

func (m *MockKeyring) EXPECT() *MockKeyringMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockKeyring) Get

func (m *MockKeyring) Get(key string) (keyring.Item, error)

Get mocks base method.

func (*MockKeyring) Remove

func (m *MockKeyring) Remove(key string) error

Remove mocks base method.

func (*MockKeyring) Set

func (m *MockKeyring) Set(item keyring.Item) error

Set mocks base method.

type MockKeyringMockRecorder

type MockKeyringMockRecorder struct {
	// contains filtered or unexported fields
}

MockKeyringMockRecorder is the mock recorder for MockKeyring.

func (*MockKeyringMockRecorder) Get

func (mr *MockKeyringMockRecorder) Get(key interface{}) *gomock.Call

Get indicates an expected call of Get.

func (*MockKeyringMockRecorder) Remove

func (mr *MockKeyringMockRecorder) Remove(key interface{}) *gomock.Call

Remove indicates an expected call of Remove.

func (*MockKeyringMockRecorder) Set

func (mr *MockKeyringMockRecorder) Set(item interface{}) *gomock.Call

Set indicates an expected call of Set.

Jump to

Keyboard shortcuts

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