blob: a56f18bd1d5c1c926d2297269fac3308d5f0d067 [file] [log] [blame]
// Code generated by mockery v0.0.0-dev. DO NOT EDIT.
package mocks
import (
context "context"
mock "github.com/stretchr/testify/mock"
frontend "go.skia.org/infra/golden/go/web/frontend"
paramtools "go.skia.org/infra/go/paramtools"
query "go.skia.org/infra/golden/go/search/query"
search "go.skia.org/infra/golden/go/search"
time "time"
types "go.skia.org/infra/golden/go/types"
)
// API is an autogenerated mock type for the API type
type API struct {
mock.Mock
}
// ChangelistLastUpdated provides a mock function with given fields: ctx, qCLID
func (_m *API) ChangelistLastUpdated(ctx context.Context, qCLID string) (time.Time, error) {
ret := _m.Called(ctx, qCLID)
if len(ret) == 0 {
panic("no return value specified for ChangelistLastUpdated")
}
var r0 time.Time
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) (time.Time, error)); ok {
return rf(ctx, qCLID)
}
if rf, ok := ret.Get(0).(func(context.Context, string) time.Time); ok {
r0 = rf(ctx, qCLID)
} else {
r0 = ret.Get(0).(time.Time)
}
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, qCLID)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// ComputeGUIStatus provides a mock function with given fields: ctx
func (_m *API) ComputeGUIStatus(ctx context.Context) (frontend.GUIStatus, error) {
ret := _m.Called(ctx)
if len(ret) == 0 {
panic("no return value specified for ComputeGUIStatus")
}
var r0 frontend.GUIStatus
var r1 error
if rf, ok := ret.Get(0).(func(context.Context) (frontend.GUIStatus, error)); ok {
return rf(ctx)
}
if rf, ok := ret.Get(0).(func(context.Context) frontend.GUIStatus); ok {
r0 = rf(ctx)
} else {
r0 = ret.Get(0).(frontend.GUIStatus)
}
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
r1 = rf(ctx)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// CountDigestsByTest provides a mock function with given fields: ctx, q
func (_m *API) CountDigestsByTest(ctx context.Context, q frontend.ListTestsQuery) (frontend.ListTestsResponse, error) {
ret := _m.Called(ctx, q)
if len(ret) == 0 {
panic("no return value specified for CountDigestsByTest")
}
var r0 frontend.ListTestsResponse
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, frontend.ListTestsQuery) (frontend.ListTestsResponse, error)); ok {
return rf(ctx, q)
}
if rf, ok := ret.Get(0).(func(context.Context, frontend.ListTestsQuery) frontend.ListTestsResponse); ok {
r0 = rf(ctx, q)
} else {
r0 = ret.Get(0).(frontend.ListTestsResponse)
}
if rf, ok := ret.Get(1).(func(context.Context, frontend.ListTestsQuery) error); ok {
r1 = rf(ctx, q)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetBlamesForUntriagedDigests provides a mock function with given fields: ctx, corpus
func (_m *API) GetBlamesForUntriagedDigests(ctx context.Context, corpus string) (search.BlameSummaryV1, error) {
ret := _m.Called(ctx, corpus)
if len(ret) == 0 {
panic("no return value specified for GetBlamesForUntriagedDigests")
}
var r0 search.BlameSummaryV1
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) (search.BlameSummaryV1, error)); ok {
return rf(ctx, corpus)
}
if rf, ok := ret.Get(0).(func(context.Context, string) search.BlameSummaryV1); ok {
r0 = rf(ctx, corpus)
} else {
r0 = ret.Get(0).(search.BlameSummaryV1)
}
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, corpus)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetChangelistParamset provides a mock function with given fields: ctx, crs, clID
func (_m *API) GetChangelistParamset(ctx context.Context, crs string, clID string) (paramtools.ReadOnlyParamSet, error) {
ret := _m.Called(ctx, crs, clID)
if len(ret) == 0 {
panic("no return value specified for GetChangelistParamset")
}
var r0 paramtools.ReadOnlyParamSet
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, string) (paramtools.ReadOnlyParamSet, error)); ok {
return rf(ctx, crs, clID)
}
if rf, ok := ret.Get(0).(func(context.Context, string, string) paramtools.ReadOnlyParamSet); ok {
r0 = rf(ctx, crs, clID)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(paramtools.ReadOnlyParamSet)
}
}
if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
r1 = rf(ctx, crs, clID)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetCluster provides a mock function with given fields: ctx, opts
func (_m *API) GetCluster(ctx context.Context, opts search.ClusterOptions) (frontend.ClusterDiffResult, error) {
ret := _m.Called(ctx, opts)
if len(ret) == 0 {
panic("no return value specified for GetCluster")
}
var r0 frontend.ClusterDiffResult
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, search.ClusterOptions) (frontend.ClusterDiffResult, error)); ok {
return rf(ctx, opts)
}
if rf, ok := ret.Get(0).(func(context.Context, search.ClusterOptions) frontend.ClusterDiffResult); ok {
r0 = rf(ctx, opts)
} else {
r0 = ret.Get(0).(frontend.ClusterDiffResult)
}
if rf, ok := ret.Get(1).(func(context.Context, search.ClusterOptions) error); ok {
r1 = rf(ctx, opts)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetCommitsInWindow provides a mock function with given fields: ctx
func (_m *API) GetCommitsInWindow(ctx context.Context) ([]frontend.Commit, error) {
ret := _m.Called(ctx)
if len(ret) == 0 {
panic("no return value specified for GetCommitsInWindow")
}
var r0 []frontend.Commit
var r1 error
if rf, ok := ret.Get(0).(func(context.Context) ([]frontend.Commit, error)); ok {
return rf(ctx)
}
if rf, ok := ret.Get(0).(func(context.Context) []frontend.Commit); ok {
r0 = rf(ctx)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]frontend.Commit)
}
}
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
r1 = rf(ctx)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetDigestDetails provides a mock function with given fields: ctx, grouping, digest, clID, crs
func (_m *API) GetDigestDetails(ctx context.Context, grouping paramtools.Params, digest types.Digest, clID string, crs string) (frontend.DigestDetails, error) {
ret := _m.Called(ctx, grouping, digest, clID, crs)
if len(ret) == 0 {
panic("no return value specified for GetDigestDetails")
}
var r0 frontend.DigestDetails
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, paramtools.Params, types.Digest, string, string) (frontend.DigestDetails, error)); ok {
return rf(ctx, grouping, digest, clID, crs)
}
if rf, ok := ret.Get(0).(func(context.Context, paramtools.Params, types.Digest, string, string) frontend.DigestDetails); ok {
r0 = rf(ctx, grouping, digest, clID, crs)
} else {
r0 = ret.Get(0).(frontend.DigestDetails)
}
if rf, ok := ret.Get(1).(func(context.Context, paramtools.Params, types.Digest, string, string) error); ok {
r1 = rf(ctx, grouping, digest, clID, crs)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetDigestsDiff provides a mock function with given fields: ctx, grouping, left, right, clID, crs
func (_m *API) GetDigestsDiff(ctx context.Context, grouping paramtools.Params, left types.Digest, right types.Digest, clID string, crs string) (frontend.DigestComparison, error) {
ret := _m.Called(ctx, grouping, left, right, clID, crs)
if len(ret) == 0 {
panic("no return value specified for GetDigestsDiff")
}
var r0 frontend.DigestComparison
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, paramtools.Params, types.Digest, types.Digest, string, string) (frontend.DigestComparison, error)); ok {
return rf(ctx, grouping, left, right, clID, crs)
}
if rf, ok := ret.Get(0).(func(context.Context, paramtools.Params, types.Digest, types.Digest, string, string) frontend.DigestComparison); ok {
r0 = rf(ctx, grouping, left, right, clID, crs)
} else {
r0 = ret.Get(0).(frontend.DigestComparison)
}
if rf, ok := ret.Get(1).(func(context.Context, paramtools.Params, types.Digest, types.Digest, string, string) error); ok {
r1 = rf(ctx, grouping, left, right, clID, crs)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetDigestsForGrouping provides a mock function with given fields: ctx, grouping
func (_m *API) GetDigestsForGrouping(ctx context.Context, grouping paramtools.Params) (frontend.DigestListResponse, error) {
ret := _m.Called(ctx, grouping)
if len(ret) == 0 {
panic("no return value specified for GetDigestsForGrouping")
}
var r0 frontend.DigestListResponse
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, paramtools.Params) (frontend.DigestListResponse, error)); ok {
return rf(ctx, grouping)
}
if rf, ok := ret.Get(0).(func(context.Context, paramtools.Params) frontend.DigestListResponse); ok {
r0 = rf(ctx, grouping)
} else {
r0 = ret.Get(0).(frontend.DigestListResponse)
}
if rf, ok := ret.Get(1).(func(context.Context, paramtools.Params) error); ok {
r1 = rf(ctx, grouping)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetPrimaryBranchParamset provides a mock function with given fields: ctx
func (_m *API) GetPrimaryBranchParamset(ctx context.Context) (paramtools.ReadOnlyParamSet, error) {
ret := _m.Called(ctx)
if len(ret) == 0 {
panic("no return value specified for GetPrimaryBranchParamset")
}
var r0 paramtools.ReadOnlyParamSet
var r1 error
if rf, ok := ret.Get(0).(func(context.Context) (paramtools.ReadOnlyParamSet, error)); ok {
return rf(ctx)
}
if rf, ok := ret.Get(0).(func(context.Context) paramtools.ReadOnlyParamSet); ok {
r0 = rf(ctx)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(paramtools.ReadOnlyParamSet)
}
}
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
r1 = rf(ctx)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// NewAndUntriagedSummaryForCL provides a mock function with given fields: ctx, qCLID
func (_m *API) NewAndUntriagedSummaryForCL(ctx context.Context, qCLID string) (search.NewAndUntriagedSummary, error) {
ret := _m.Called(ctx, qCLID)
if len(ret) == 0 {
panic("no return value specified for NewAndUntriagedSummaryForCL")
}
var r0 search.NewAndUntriagedSummary
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) (search.NewAndUntriagedSummary, error)); ok {
return rf(ctx, qCLID)
}
if rf, ok := ret.Get(0).(func(context.Context, string) search.NewAndUntriagedSummary); ok {
r0 = rf(ctx, qCLID)
} else {
r0 = ret.Get(0).(search.NewAndUntriagedSummary)
}
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, qCLID)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Search provides a mock function with given fields: _a0, _a1
func (_m *API) Search(_a0 context.Context, _a1 *query.Search) (*frontend.SearchResponse, error) {
ret := _m.Called(_a0, _a1)
if len(ret) == 0 {
panic("no return value specified for Search")
}
var r0 *frontend.SearchResponse
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *query.Search) (*frontend.SearchResponse, error)); ok {
return rf(_a0, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *query.Search) *frontend.SearchResponse); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*frontend.SearchResponse)
}
}
if rf, ok := ret.Get(1).(func(context.Context, *query.Search) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// NewAPI creates a new instance of API. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
// The first argument is typically a *testing.T value.
func NewAPI(t interface {
mock.TestingT
Cleanup(func())
}) *API {
mock := &API{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}