mocks

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	GetGetVaultsFunc       func() ([]onepassword.Vault, error)
	DoGetVaultsByTitleFunc func(title string) ([]onepassword.Vault, error)
	GetGetItemFunc         func(uuid string, vaultUUID string) (*onepassword.Item, error)
	DoGetItemsByTitleFunc  func(title string, vaultUUID string) ([]onepassword.Item, error)
	DoGetItemByTitleFunc   func(title string, vaultUUID string) (*onepassword.Item, error)
	DoCreateItemFunc       func(item *onepassword.Item, vaultUUID string) (*onepassword.Item, error)
	DoDeleteItemFunc       func(item *onepassword.Item, vaultUUID string) error
	DoGetItemsFunc         func(vaultUUID string) ([]onepassword.Item, error)
	DoUpdateItemFunc       func(item *onepassword.Item, vaultUUID string) (*onepassword.Item, error)
)

Functions

This section is empty.

Types

type TestClient

type TestClient struct {
	GetVaultsFunc        func() ([]onepassword.Vault, error)
	GetVaultsByTitleFunc func(title string) ([]onepassword.Vault, error)
	GetItemFunc          func(uuid string, vaultUUID string) (*onepassword.Item, error)
	GetItemsFunc         func(vaultUUID string) ([]onepassword.Item, error)
	GetItemsByTitleFunc  func(title string, vaultUUID string) ([]onepassword.Item, error)
	GetItemByTitleFunc   func(title string, vaultUUID string) (*onepassword.Item, error)
	CreateItemFunc       func(item *onepassword.Item, vaultUUID string) (*onepassword.Item, error)
	UpdateItemFunc       func(item *onepassword.Item, vaultUUID string) (*onepassword.Item, error)
	DeleteItemFunc       func(item *onepassword.Item, vaultUUID string) error
}

func (*TestClient) CreateItem

func (m *TestClient) CreateItem(item *onepassword.Item, vaultUUID string) (*onepassword.Item, error)

func (*TestClient) DeleteItem

func (m *TestClient) DeleteItem(item *onepassword.Item, vaultUUID string) error

func (*TestClient) GetItem

func (m *TestClient) GetItem(uuid string, vaultUUID string) (*onepassword.Item, error)

func (*TestClient) GetItemByTitle

func (m *TestClient) GetItemByTitle(title string, vaultUUID string) (*onepassword.Item, error)

func (*TestClient) GetItems

func (m *TestClient) GetItems(vaultUUID string) ([]onepassword.Item, error)

func (*TestClient) GetItemsByTitle added in v0.0.2

func (m *TestClient) GetItemsByTitle(title, vaultUUID string) ([]onepassword.Item, error)

func (*TestClient) GetVaults

func (m *TestClient) GetVaults() ([]onepassword.Vault, error)

Do is the mock client's `Do` func

func (*TestClient) GetVaultsByTitle added in v0.0.2

func (m *TestClient) GetVaultsByTitle(title string) ([]onepassword.Vault, error)

func (*TestClient) UpdateItem

func (m *TestClient) UpdateItem(item *onepassword.Item, vaultUUID string) (*onepassword.Item, error)

Jump to

Keyboard shortcuts

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