clientmock

package
v0.56.5 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2024 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 MockClient

type MockClient struct {
	ListRepoAlertsCallback           func(string, string, *github.AlertListOptions) ([]*github.Alert, *github.Response, error)
	ListRepoDependabotAlertsCallback func(string, string, *github.ListAlertsOptions) ([]*github.DependabotAlert, *github.Response, error)
}

MockClient mocks the two methods of google's github client we use

func NewMockClient

func NewMockClient() MockClient

NewMockClient returns a mock github client

func (MockClient) ListRepoAlerts

func (m MockClient) ListRepoAlerts(_ context.Context, owner string, repo string, opt *github.AlertListOptions) ([]*github.Alert, *github.Response, error)

ListRepoAlerts calls the mocked callback

func (MockClient) ListRepoDependabotAlerts

func (m MockClient) ListRepoDependabotAlerts(_ context.Context, owner string, repo string, opt *github.ListAlertsOptions) ([]*github.DependabotAlert, *github.Response, error)

ListRepoDependabotAlerts calls the mocked callback

Jump to

Keyboard shortcuts

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