fake

package
v0.5.8 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OnePasswordMockClient

type OnePasswordMockClient struct {
	MockVaults       map[string][]onepassword.Vault
	MockItems        map[string][]onepassword.Item // ID and Title only
	MockItemFields   map[string]map[string][]*onepassword.ItemField
	MockFileContents map[string][]byte
}

OnePasswordMockClient is a fake connect.Client.

func NewMockClient

func NewMockClient() *OnePasswordMockClient

NewMockClient returns an instantiated mock client.

func (*OnePasswordMockClient) AddPredictableItemWithField

func (mockClient *OnePasswordMockClient) AddPredictableItemWithField(vaultName, title, label, value string) *OnePasswordMockClient

AddPredictableItemWithField adds an item and it's fields to the mock client in a predictable way.

func (*OnePasswordMockClient) AddPredictableVault

func (mockClient *OnePasswordMockClient) AddPredictableVault(name string) *OnePasswordMockClient

AddPredictableVault adds vaults to the mock client in a predictable way.

func (*OnePasswordMockClient) AppendItem

func (mockClient *OnePasswordMockClient) AppendItem(vaultID string, item onepassword.Item) *OnePasswordMockClient

AppendItem appends a onepassword.Item to the mock client.

func (*OnePasswordMockClient) AppendItemField

func (mockClient *OnePasswordMockClient) AppendItemField(vaultID, itemID string, itemField onepassword.ItemField) *OnePasswordMockClient

AppendItemField appends a onepassword.ItemField to the mock client.

func (*OnePasswordMockClient) AppendVault

func (mockClient *OnePasswordMockClient) AppendVault(name string, vault onepassword.Vault) *OnePasswordMockClient

AppendVault appends a onepassword.Vault to the mock client.

func (*OnePasswordMockClient) CreateItem

func (mockClient *OnePasswordMockClient) CreateItem(item *onepassword.Item, vaultUUID string) (*onepassword.Item, error)

CreateItem unused fake.

func (*OnePasswordMockClient) DeleteItem

func (mockClient *OnePasswordMockClient) DeleteItem(item *onepassword.Item, vaultUUID string) error

DeleteItem unused fake.

func (*OnePasswordMockClient) DeleteItemByID added in v0.5.7

func (mockClient *OnePasswordMockClient) DeleteItemByID(itemUUID, vaultQuery string) error

DeleteItemByID unused fake.

func (*OnePasswordMockClient) DownloadFile added in v0.5.7

func (mockClient *OnePasswordMockClient) DownloadFile(file *onepassword.File, targetDirectory string, overwrite bool) (string, error)

DownloadFile unused fake.

func (*OnePasswordMockClient) GetFile

func (mockClient *OnePasswordMockClient) GetFile(fileUUID, itemUUID, vaultUUID string) (*onepassword.File, error)

GetFile unused fake.

func (*OnePasswordMockClient) GetFileContent

func (mockClient *OnePasswordMockClient) GetFileContent(file *onepassword.File) ([]byte, error)

GetFileContent returns file data, you must preload.

func (*OnePasswordMockClient) GetFiles added in v0.5.7

func (mockClient *OnePasswordMockClient) GetFiles(itemQuery, vaultQuery string) ([]onepassword.File, error)

GetFiles unused fake.

func (*OnePasswordMockClient) GetItem

func (mockClient *OnePasswordMockClient) GetItem(itemUUID, vaultUUID string) (*onepassword.Item, error)

GetItem returns a *onepassword.Item, you must preload.

func (*OnePasswordMockClient) GetItemByTitle

func (mockClient *OnePasswordMockClient) GetItemByTitle(title, vaultUUID string) (*onepassword.Item, error)

GetItemByTitle unused fake.

func (*OnePasswordMockClient) GetItemByUUID added in v0.5.7

func (mockClient *OnePasswordMockClient) GetItemByUUID(uuid, vaultQuery string) (*onepassword.Item, error)

GetItemByUUID unused fake.

func (*OnePasswordMockClient) GetItems

func (mockClient *OnePasswordMockClient) GetItems(vaultUUID string) ([]onepassword.Item, error)

GetItems returns []onepassword.Item, you must preload.

func (*OnePasswordMockClient) GetItemsByTitle

func (mockClient *OnePasswordMockClient) GetItemsByTitle(itemUUID, vaultUUID string) ([]onepassword.Item, error)

GetItemsByTitle returns a list of items, you must preload.

func (*OnePasswordMockClient) GetVault

func (mockClient *OnePasswordMockClient) GetVault(uuid string) (*onepassword.Vault, error)

GetVault unused fake.

func (*OnePasswordMockClient) GetVaultByTitle added in v0.5.7

func (mockClient *OnePasswordMockClient) GetVaultByTitle(uuid string) (*onepassword.Vault, error)

GetVaultByTitle unused fake.

func (*OnePasswordMockClient) GetVaultByUUID added in v0.5.7

func (mockClient *OnePasswordMockClient) GetVaultByUUID(uuid string) (*onepassword.Vault, error)

GetVaultByUUID unused fake.

func (*OnePasswordMockClient) GetVaults

func (mockClient *OnePasswordMockClient) GetVaults() ([]onepassword.Vault, error)

GetVaults unused fake.

func (*OnePasswordMockClient) GetVaultsByTitle

func (mockClient *OnePasswordMockClient) GetVaultsByTitle(uuid string) ([]onepassword.Vault, error)

GetVaultsByTitle returns a list of vaults, you must preload.

func (*OnePasswordMockClient) LoadStruct added in v0.5.7

func (mockClient *OnePasswordMockClient) LoadStruct(config interface{}) error

LoadStructunused fake.

func (*OnePasswordMockClient) LoadStructFromItem added in v0.5.7

func (mockClient *OnePasswordMockClient) LoadStructFromItem(config interface{}, itemQuery, vaultQuery string) error

LoadStructFromItem unused fake.

func (*OnePasswordMockClient) LoadStructFromItemByTitle added in v0.5.7

func (mockClient *OnePasswordMockClient) LoadStructFromItemByTitle(config interface{}, itemTitle, vaultQuery string) error

LoadStructFromItemByTitle unused fake.

func (*OnePasswordMockClient) LoadStructFromItemByUUID added in v0.5.7

func (mockClient *OnePasswordMockClient) LoadStructFromItemByUUID(config interface{}, itemUUID, vaultQuery string) error

LoadStructFromItemByUUID unused fake.

func (*OnePasswordMockClient) SetFileContents

func (mockClient *OnePasswordMockClient) SetFileContents(name string, contents []byte) *OnePasswordMockClient

SetFileContents adds file contents to the mock client.

func (*OnePasswordMockClient) UpdateItem

func (mockClient *OnePasswordMockClient) UpdateItem(item *onepassword.Item, vaultUUID string) (*onepassword.Item, error)

UpdateItem unused fake.

Jump to

Keyboard shortcuts

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