fake

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockKeyClient

type MockKeyClient struct {
	bitbucket.KeyClientAPI

	MockCreateAccessKey           func(ctx context.Context, repo bitbucket.Repo, key bitbucket.AccessKey) (result bitbucket.AccessKey, err error)
	MockDeleteAccessKey           func(ctx context.Context, repo bitbucket.Repo, id int) (err error)
	MockGetAccessKey              func(ctx context.Context, repo bitbucket.Repo, id int) (result bitbucket.AccessKey, err error)
	MockListAccessKeys            func(ctx context.Context, repo bitbucket.Repo) (result []bitbucket.AccessKey, err error)
	MockUpdateAccessKeyPermission func(ctx context.Context, repo bitbucket.Repo, id int, permission string) (err error)
}

MockKeyClient is a fake implementation of KeyClientAPI

func (*MockKeyClient) CreateAccessKey

func (c *MockKeyClient) CreateAccessKey(ctx context.Context, repo bitbucket.Repo, key bitbucket.AccessKey) (result bitbucket.AccessKey, err error)

CreateAccessKey calls the mock

func (*MockKeyClient) DeleteAccessKey

func (c *MockKeyClient) DeleteAccessKey(ctx context.Context, repo bitbucket.Repo, id int) (err error)

DeleteAccessKey calls the mock

func (*MockKeyClient) GetAccessKey

func (c *MockKeyClient) GetAccessKey(ctx context.Context, repo bitbucket.Repo, id int) (result bitbucket.AccessKey, err error)

GetAccessKey calls the mock

func (*MockKeyClient) ListAccessKeys

func (c *MockKeyClient) ListAccessKeys(ctx context.Context, repo bitbucket.Repo) (result []bitbucket.AccessKey, err error)

ListAccessKeys calls the mock

func (*MockKeyClient) UpdateAccessKeyPermission

func (c *MockKeyClient) UpdateAccessKeyPermission(ctx context.Context, repo bitbucket.Repo, id int, permission string) error

UpdateAccessKeyPermission calls the mock

type MockWebhookClient

type MockWebhookClient struct {
	bitbucket.WebhookClientAPI

	MockCreateWebhook func(ctx context.Context, repo bitbucket.Repo, hook bitbucket.Webhook) (result bitbucket.Webhook, err error)
	MockDeleteWebhook func(ctx context.Context, repo bitbucket.Repo, id int) (err error)
	MockGetWebhook    func(ctx context.Context, repo bitbucket.Repo, id int) (result bitbucket.Webhook, err error)
	MockUpdateWebhook func(ctx context.Context, repo bitbucket.Repo, id int, hook bitbucket.Webhook) (result bitbucket.Webhook, err error)
}

MockWebhookClient is a fake implementation of WebhookClientAPI

func (*MockWebhookClient) CreateWebhook

func (c *MockWebhookClient) CreateWebhook(ctx context.Context, repo bitbucket.Repo, hook bitbucket.Webhook) (result bitbucket.Webhook, err error)

CreateWebhook calls the mock

func (*MockWebhookClient) DeleteWebhook

func (c *MockWebhookClient) DeleteWebhook(ctx context.Context, repo bitbucket.Repo, id int) (err error)

DeleteWebhook calls the mock

func (*MockWebhookClient) GetWebhook

func (c *MockWebhookClient) GetWebhook(ctx context.Context, repo bitbucket.Repo, id int) (result bitbucket.Webhook, err error)

GetWebhook calls the mock

func (*MockWebhookClient) UpdateWebhook

func (c *MockWebhookClient) UpdateWebhook(ctx context.Context, repo bitbucket.Repo, id int, hook bitbucket.Webhook) (result bitbucket.Webhook, err error)

UpdateWebhook calls the mock

Jump to

Keyboard shortcuts

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