mocks

package
v0.0.15-dev Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2020 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bucket

type Bucket struct {
	mock.Mock
}

Bucket is an autogenerated mock type for the Bucket type

func (*Bucket) CreateDirectory

func (_m *Bucket) CreateDirectory(ctx context.Context, _a1 string) (path.Resolved, path.Path, error)

CreateDirectory provides a mock function with given fields: ctx, _a1

func (*Bucket) DeleteDirOrFile

func (_m *Bucket) DeleteDirOrFile(ctx context.Context, _a1 string) (path.Resolved, error)

DeleteDirOrFile provides a mock function with given fields: ctx, _a1

func (*Bucket) DirExists

func (_m *Bucket) DirExists(ctx context.Context, _a1 string) (bool, error)

DirExists provides a mock function with given fields: ctx, _a1

func (*Bucket) FileExists

func (_m *Bucket) FileExists(ctx context.Context, _a1 string) (bool, error)

FileExists provides a mock function with given fields: ctx, _a1

func (*Bucket) GetData

func (_m *Bucket) GetData() bucket.BucketData

GetData provides a mock function with given fields:

func (*Bucket) GetFile

func (_m *Bucket) GetFile(ctx context.Context, _a1 string, w io.Writer) error

GetFile provides a mock function with given fields: ctx, _a1, w

func (*Bucket) GetThreadID added in v0.0.13

func (_m *Bucket) GetThreadID(ctx context.Context) (*thread.ID, error)

GetThreadID provides a mock function with given fields: ctx

func (*Bucket) Key

func (_m *Bucket) Key() string

Key provides a mock function with given fields:

func (*Bucket) ListDirectory

func (_m *Bucket) ListDirectory(ctx context.Context, _a1 string) (*bucket.DirEntries, error)

ListDirectory provides a mock function with given fields: ctx, _a1

func (*Bucket) Slug

func (_m *Bucket) Slug() string

Slug provides a mock function with given fields:

func (*Bucket) UploadFile

func (_m *Bucket) UploadFile(ctx context.Context, _a1 string, reader io.Reader) (path.Resolved, path.Path, error)

UploadFile provides a mock function with given fields: ctx, _a1, reader

type Client

type Client struct {
	mock.Mock
}

Client is an autogenerated mock type for the Client type

func (*Client) AcceptSharedFilesInvitation added in v0.0.13

func (_m *Client) AcceptSharedFilesInvitation(ctx context.Context, invitation domain.Invitation) (domain.Invitation, error)

AcceptSharedFilesInvitation provides a mock function with given fields: ctx, invitation

func (*Client) AttachMailboxNotifier added in v0.0.13

func (_m *Client) AttachMailboxNotifier(notif textile.GrpcMailboxNotifier)

AttachMailboxNotifier provides a mock function with given fields: notif

func (*Client) CreateBucket

func (_m *Client) CreateBucket(ctx context.Context, bucketSlug string) (textile.Bucket, error)

CreateBucket provides a mock function with given fields: ctx, bucketSlug

func (*Client) GetBucket

func (_m *Client) GetBucket(ctx context.Context, slug string, remoteFile *textile.GetBucketForRemoteFileInput) (textile.Bucket, error)

GetBucket provides a mock function with given fields: ctx, slug, remoteFile

func (*Client) GetDefaultBucket

func (_m *Client) GetDefaultBucket(ctx context.Context) (textile.Bucket, error)

GetDefaultBucket provides a mock function with given fields: ctx

func (*Client) GetMailAsNotifications added in v0.0.13

func (_m *Client) GetMailAsNotifications(ctx context.Context, seek string, limit int) ([]*domain.Notification, error)

GetMailAsNotifications provides a mock function with given fields: ctx, seek, limit

func (*Client) GetModel added in v0.0.13

func (_m *Client) GetModel() model.Model

GetModel provides a mock function with given fields:

func (*Client) GetReceivedFiles added in v0.0.14

func (_m *Client) GetReceivedFiles(ctx context.Context, accepted bool, seek string, limit int) ([]*domain.SharedDirEntry, string, error)

GetReceivedFiles provides a mock function with given fields: ctx, accepted, seek, limit

func (*Client) GetThreadsConnection

func (_m *Client) GetThreadsConnection() (*client.Client, error)

GetThreadsConnection provides a mock function with given fields:

func (*Client) IsBucketBackup added in v0.0.13

func (_m *Client) IsBucketBackup(ctx context.Context, bucketSlug string) bool

IsBucketBackup provides a mock function with given fields: ctx, bucketSlug

func (*Client) IsMirrorFile added in v0.0.13

func (_m *Client) IsMirrorFile(ctx context.Context, _a1 string, bucketSlug string) bool

IsMirrorFile provides a mock function with given fields: ctx, _a1, bucketSlug

func (*Client) IsRunning

func (_m *Client) IsRunning() bool

IsRunning provides a mock function with given fields:

func (*Client) JoinBucket added in v0.0.8

func (_m *Client) JoinBucket(ctx context.Context, slug string, ti *domain.ThreadInfo) (bool, error)

JoinBucket provides a mock function with given fields: ctx, slug, ti

func (*Client) ListBuckets

func (_m *Client) ListBuckets(ctx context.Context) ([]textile.Bucket, error)

ListBuckets provides a mock function with given fields: ctx

func (*Client) MarkMirrorFileBackup added in v0.0.13

func (_m *Client) MarkMirrorFileBackup(ctx context.Context, _a1 string, bucketSlug string) (*domain.MirrorFile, error)

MarkMirrorFileBackup provides a mock function with given fields: ctx, _a1, bucketSlug

func (*Client) RejectSharedFilesInvitation added in v0.0.13

func (_m *Client) RejectSharedFilesInvitation(ctx context.Context, invitation domain.Invitation) (domain.Invitation, error)

RejectSharedFilesInvitation provides a mock function with given fields: ctx, invitation

func (*Client) RemoveKeys added in v0.0.13

func (_m *Client) RemoveKeys() error

RemoveKeys provides a mock function with given fields:

func (*Client) SendMessage added in v0.0.13

func (_m *Client) SendMessage(ctx context.Context, recipient crypto.PubKey, body []byte) (*usersclient.Message, error)

SendMessage provides a mock function with given fields: ctx, recipient, body

func (*Client) ShareBucket added in v0.0.8

func (_m *Client) ShareBucket(ctx context.Context, bucketSlug string) (*db.Info, error)

ShareBucket provides a mock function with given fields: ctx, bucketSlug

func (*Client) ShareFilesViaPublicKey added in v0.0.13

func (_m *Client) ShareFilesViaPublicKey(ctx context.Context, paths []domain.FullPath, pubkeys []crypto.PubKey, keys [][]byte) error

ShareFilesViaPublicKey provides a mock function with given fields: ctx, paths, pubkeys, keys

func (*Client) Shutdown

func (_m *Client) Shutdown() error

Shutdown provides a mock function with given fields:

func (*Client) Start added in v0.0.10

func (_m *Client) Start(ctx context.Context, cfg config.Config) error

Start provides a mock function with given fields: ctx, cfg

func (*Client) ToggleBucketBackup added in v0.0.13

func (_m *Client) ToggleBucketBackup(ctx context.Context, bucketSlug string, bucketBackup bool) (bool, error)

ToggleBucketBackup provides a mock function with given fields: ctx, bucketSlug, bucketBackup

func (*Client) UploadFileToHub added in v0.0.13

func (_m *Client) UploadFileToHub(ctx context.Context, b textile.Bucket, _a2 string, reader io.Reader) (path.Resolved, path.Path, error)

UploadFileToHub provides a mock function with given fields: ctx, b, _a2, reader

func (*Client) WaitForHealthy added in v0.0.19

func (_m *Client) WaitForHealthy() chan bool

WaitForHealthy provides a mock function with given fields:

func (*Client) WaitForReady

func (_m *Client) WaitForReady() chan bool

WaitForReady provides a mock function with given fields:

type Config

type Config struct {
	mock.Mock
}

Config is an autogenerated mock type for the Config type

func (*Config) GetBool added in v0.0.13

func (_m *Config) GetBool(key string, defaultValue interface{}) bool

GetBool provides a mock function with given fields: key, defaultValue

func (*Config) GetInt

func (_m *Config) GetInt(key string, defaultValue interface{}) int

GetInt provides a mock function with given fields: key, defaultValue

func (*Config) GetString

func (_m *Config) GetString(key string, defaultValue interface{}) string

GetString provides a mock function with given fields: key, defaultValue

type HubAuth added in v0.0.13

type HubAuth struct {
	mock.Mock
}

HubAuth is an autogenerated mock type for the HubAuth type

func (*HubAuth) ClearCache added in v0.0.13

func (_m *HubAuth) ClearCache() error

ClearCache provides a mock function with given fields:

func (*HubAuth) GetHubContext added in v0.0.13

func (_m *HubAuth) GetHubContext(ctx context.Context) (context.Context, error)

GetHubContext provides a mock function with given fields: ctx

func (*HubAuth) GetTokensWithCache added in v0.0.13

func (_m *HubAuth) GetTokensWithCache(ctx context.Context) (*hub.AuthTokens, error)

GetTokensWithCache provides a mock function with given fields: ctx

type Keychain

type Keychain struct {
	mock.Mock
}

Keychain is an autogenerated mock type for the Keychain type

func (*Keychain) DeleteKeypair added in v0.0.13

func (_m *Keychain) DeleteKeypair() error

DeleteKeypair provides a mock function with given fields:

func (*Keychain) GenerateKeyFromMnemonic added in v0.0.13

func (_m *Keychain) GenerateKeyFromMnemonic(_a0 ...keychain.GenerateKeyFromMnemonicOpts) (string, error)

GenerateKeyFromMnemonic provides a mock function with given fields: _a0

func (*Keychain) GenerateKeyPair

func (_m *Keychain) GenerateKeyPair() ([]byte, []byte, error)

GenerateKeyPair provides a mock function with given fields:

func (*Keychain) GenerateKeyPairWithForce

func (_m *Keychain) GenerateKeyPairWithForce() ([]byte, []byte, error)

GenerateKeyPairWithForce provides a mock function with given fields:

func (*Keychain) GetStoredKeyPairInLibP2PFormat

func (_m *Keychain) GetStoredKeyPairInLibP2PFormat() (crypto.PrivKey, crypto.PubKey, error)

GetStoredKeyPairInLibP2PFormat provides a mock function with given fields:

func (*Keychain) GetStoredMnemonic added in v0.0.13

func (_m *Keychain) GetStoredMnemonic() (string, error)

GetStoredMnemonic provides a mock function with given fields:

func (*Keychain) GetStoredPublicKey added in v0.0.13

func (_m *Keychain) GetStoredPublicKey() (crypto.PubKey, error)

GetStoredPublicKey provides a mock function with given fields:

func (*Keychain) ImportExistingKeyPair added in v0.0.13

func (_m *Keychain) ImportExistingKeyPair(priv crypto.PrivKey, mnemonic string) error

ImportExistingKeyPair provides a mock function with given fields: priv, mnemonic

func (*Keychain) Sign

func (_m *Keychain) Sign(_a0 []byte) ([]byte, error)

Sign provides a mock function with given fields: _a0

type Keyring added in v0.0.13

type Keyring struct {
	mock.Mock
}

Keyring is an autogenerated mock type for the Keyring type

func (*Keyring) Get added in v0.0.13

func (_m *Keyring) Get(_a0 string) (keyring.Item, error)

Get provides a mock function with given fields: _a0

func (*Keyring) GetMetadata added in v0.0.13

func (_m *Keyring) GetMetadata(_a0 string) (keyring.Metadata, error)

GetMetadata provides a mock function with given fields: _a0

func (*Keyring) Remove added in v0.0.13

func (_m *Keyring) Remove(_a0 string) error

Remove provides a mock function with given fields: _a0

func (*Keyring) Set added in v0.0.13

func (_m *Keyring) Set(_a0 keyring.Item) error

Set provides a mock function with given fields: _a0

type Mailbox added in v0.0.13

type Mailbox struct {
	mock.Mock
}

Mailbox is an autogenerated mock type for the Mailbox type

func (*Mailbox) Identity added in v0.0.13

func (_m *Mailbox) Identity() thread.Identity

Identity provides a mock function with given fields:

func (*Mailbox) ListInboxMessages added in v0.0.13

func (_m *Mailbox) ListInboxMessages(ctx context.Context, opts ...client.ListOption) ([]client.Message, error)

ListInboxMessages provides a mock function with given fields: ctx, opts

func (*Mailbox) SendMessage added in v0.0.13

func (_m *Mailbox) SendMessage(ctx context.Context, to thread.PubKey, body []byte) (client.Message, error)

SendMessage provides a mock function with given fields: ctx, to, body

func (*Mailbox) WatchInbox added in v0.0.13

func (_m *Mailbox) WatchInbox(ctx context.Context, mevents chan<- local.MailboxEvent, offline bool) (<-chan cmd.WatchState, error)

WatchInbox provides a mock function with given fields: ctx, mevents, offline

type Path

type Path struct {
	mock.Mock
}

func (Path) IsValid

func (m Path) IsValid() error

func (Path) Mutable

func (m Path) Mutable() bool

func (Path) Namespace

func (m Path) Namespace() string

func (Path) String

func (m Path) String() string

type SpaceEnv

type SpaceEnv struct {
	mock.Mock
}

SpaceEnv is an autogenerated mock type for the SpaceEnv type

func (*SpaceEnv) CurrentFolder

func (_m *SpaceEnv) CurrentFolder() (string, error)

CurrentFolder provides a mock function with given fields:

func (*SpaceEnv) LogLevel

func (_m *SpaceEnv) LogLevel() string

LogLevel provides a mock function with given fields:

func (*SpaceEnv) WorkingFolder

func (_m *SpaceEnv) WorkingFolder() string

WorkingFolder provides a mock function with given fields:

type Store

type Store struct {
	mock.Mock
}

Store is an autogenerated mock type for the Store type

func (*Store) Close

func (_m *Store) Close() error

Close provides a mock function with given fields:

func (*Store) Get

func (_m *Store) Get(key []byte) ([]byte, error)

Get provides a mock function with given fields: key

func (*Store) IsOpen

func (_m *Store) IsOpen() bool

IsOpen provides a mock function with given fields:

func (*Store) KeysWithPrefix

func (_m *Store) KeysWithPrefix(prefix string) ([]string, error)

KeysWithPrefix provides a mock function with given fields: prefix

func (*Store) Open

func (_m *Store) Open() error

Open provides a mock function with given fields:

func (*Store) Remove

func (_m *Store) Remove(key []byte) error

Remove provides a mock function with given fields: key

func (*Store) Set

func (_m *Store) Set(key []byte, value []byte) error

Set provides a mock function with given fields: key, value

func (*Store) SetString

func (_m *Store) SetString(key string, value string) error

SetString provides a mock function with given fields: key, value

type Syncer

type Syncer struct {
	mock.Mock
}

Syncer is an autogenerated mock type for the Syncer type

func (*Syncer) AddFileWatch

func (_m *Syncer) AddFileWatch(addFileInfo domain.AddWatchFile) error

AddFileWatch provides a mock function with given fields: addFileInfo

func (*Syncer) GetOpenFilePath

func (_m *Syncer) GetOpenFilePath(bucketSlug string, bucketPath string) (string, bool)

GetOpenFilePath provides a mock function with given fields: bucketSlug, bucketPath

type TextileNotifier

type TextileNotifier struct {
	mock.Mock
}

TextileNotifier is an autogenerated mock type for the TextileNotifier type

func (*TextileNotifier) SendTextileEvent

func (_m *TextileNotifier) SendTextileEvent(event events.TextileEvent)

SendTextileEvent provides a mock function with given fields: event

type UsersClient added in v0.0.13

type UsersClient struct {
	mock.Mock
}

UsersClient is an autogenerated mock type for the UsersClient type

func (*UsersClient) ListInboxMessages added in v0.0.13

func (_m *UsersClient) ListInboxMessages(ctx context.Context, opts ...client.ListOption) ([]client.Message, error)

ListInboxMessages provides a mock function with given fields: ctx, opts

func (*UsersClient) SendMessage added in v0.0.13

func (_m *UsersClient) SendMessage(ctx context.Context, from thread.Identity, to thread.PubKey, body []byte) (client.Message, error)

SendMessage provides a mock function with given fields: ctx, from, to, body

func (*UsersClient) SetupMailbox added in v0.0.13

func (_m *UsersClient) SetupMailbox(ctx context.Context) (thread.ID, error)

SetupMailbox provides a mock function with given fields: ctx

type Vault added in v0.0.13

type Vault struct {
	mock.Mock
}

Vault is an autogenerated mock type for the Vault type

func (*Vault) Retrieve added in v0.0.13

func (_m *Vault) Retrieve(uuid string, passphrase string) ([]vault.VaultItem, error)

Retrieve provides a mock function with given fields: uuid, passphrase

func (*Vault) Store added in v0.0.13

func (_m *Vault) Store(uuid string, passphrase string, apiToken string, items []vault.VaultItem) (*vault.StoredVault, error)

Store provides a mock function with given fields: uuid, passphrase, apiToken, items

Jump to

Keyboard shortcuts

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