mocks

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlertRepository added in v0.6.0

type AlertRepository struct {
	mock.Mock
}

AlertRepository is an autogenerated mock type for the AlertRepository type

func NewAlertRepository added in v0.6.0

func NewAlertRepository(t interface {
	mock.TestingT
	Cleanup(func())
}) *AlertRepository

NewAlertRepository creates a new instance of AlertRepository. 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 (*AlertRepository) DeactivateAlert added in v0.6.0

func (_m *AlertRepository) DeactivateAlert(_a0 context.Context, _a1 *model.Alert) error

DeactivateAlert provides a mock function with given fields: _a0, _a1

func (*AlertRepository) DeleteAlert added in v0.6.0

func (_m *AlertRepository) DeleteAlert(_a0 context.Context, _a1 uint32, _a2 uint32) error

DeleteAlert provides a mock function with given fields: _a0, _a1, _a2

func (*AlertRepository) DeleteAlertCondNotification added in v0.6.0

func (_m *AlertRepository) DeleteAlertCondNotification(_a0 context.Context, _a1 uint32, _a2 uint32, _a3 uint32) error

DeleteAlertCondNotification provides a mock function with given fields: _a0, _a1, _a2, _a3

func (*AlertRepository) DeleteAlertCondRule added in v0.6.0

func (_m *AlertRepository) DeleteAlertCondRule(_a0 context.Context, _a1 uint32, _a2 uint32, _a3 uint32) error

DeleteAlertCondRule provides a mock function with given fields: _a0, _a1, _a2, _a3

func (*AlertRepository) DeleteAlertCondition added in v0.6.0

func (_m *AlertRepository) DeleteAlertCondition(_a0 context.Context, _a1 uint32, _a2 uint32) error

DeleteAlertCondition provides a mock function with given fields: _a0, _a1, _a2

func (*AlertRepository) DeleteAlertHistory added in v0.6.0

func (_m *AlertRepository) DeleteAlertHistory(_a0 context.Context, _a1 uint32, _a2 uint32) error

DeleteAlertHistory provides a mock function with given fields: _a0, _a1, _a2

func (*AlertRepository) DeleteAlertRule added in v0.6.0

func (_m *AlertRepository) DeleteAlertRule(_a0 context.Context, _a1 uint32, _a2 uint32) error

DeleteAlertRule provides a mock function with given fields: _a0, _a1, _a2

func (*AlertRepository) DeleteNotification added in v0.6.0

func (_m *AlertRepository) DeleteNotification(_a0 context.Context, _a1 uint32, _a2 uint32) error

DeleteNotification provides a mock function with given fields: _a0, _a1, _a2

func (*AlertRepository) DeleteRelAlertFinding added in v0.6.0

func (_m *AlertRepository) DeleteRelAlertFinding(_a0 context.Context, _a1 uint32, _a2 uint32, _a3 uint64) error

DeleteRelAlertFinding provides a mock function with given fields: _a0, _a1, _a2, _a3

func (*AlertRepository) GetAlert added in v0.6.0

func (_m *AlertRepository) GetAlert(_a0 context.Context, _a1 uint32, _a2 uint32) (*model.Alert, error)

GetAlert provides a mock function with given fields: _a0, _a1, _a2

func (*AlertRepository) GetAlertByAlertConditionIDStatus added in v0.6.0

func (_m *AlertRepository) GetAlertByAlertConditionIDStatus(_a0 context.Context, _a1 uint32, _a2 uint32, _a3 []string) (*model.Alert, error)

GetAlertByAlertConditionIDStatus provides a mock function with given fields: _a0, _a1, _a2, _a3

func (*AlertRepository) GetAlertCondNotification added in v0.6.0

func (_m *AlertRepository) GetAlertCondNotification(_a0 context.Context, _a1 uint32, _a2 uint32, _a3 uint32) (*model.AlertCondNotification, error)

GetAlertCondNotification provides a mock function with given fields: _a0, _a1, _a2, _a3

func (*AlertRepository) GetAlertCondRule added in v0.6.0

func (_m *AlertRepository) GetAlertCondRule(_a0 context.Context, _a1 uint32, _a2 uint32, _a3 uint32) (*model.AlertCondRule, error)

GetAlertCondRule provides a mock function with given fields: _a0, _a1, _a2, _a3

func (*AlertRepository) GetAlertCondition added in v0.6.0

func (_m *AlertRepository) GetAlertCondition(_a0 context.Context, _a1 uint32, _a2 uint32) (*model.AlertCondition, error)

GetAlertCondition provides a mock function with given fields: _a0, _a1, _a2

func (*AlertRepository) GetAlertHistory added in v0.6.0

func (_m *AlertRepository) GetAlertHistory(_a0 context.Context, _a1 uint32, _a2 uint32) (*model.AlertHistory, error)

GetAlertHistory provides a mock function with given fields: _a0, _a1, _a2

func (*AlertRepository) GetAlertRule added in v0.6.0

func (_m *AlertRepository) GetAlertRule(_a0 context.Context, _a1 uint32, _a2 uint32) (*model.AlertRule, error)

GetAlertRule provides a mock function with given fields: _a0, _a1, _a2

func (*AlertRepository) GetNotification added in v0.6.0

func (_m *AlertRepository) GetNotification(_a0 context.Context, _a1 uint32, _a2 uint32) (*model.Notification, error)

GetNotification provides a mock function with given fields: _a0, _a1, _a2

func (*AlertRepository) GetRelAlertFinding added in v0.6.0

func (_m *AlertRepository) GetRelAlertFinding(_a0 context.Context, _a1 uint32, _a2 uint32, _a3 uint64) (*model.RelAlertFinding, error)

GetRelAlertFinding provides a mock function with given fields: _a0, _a1, _a2, _a3

func (*AlertRepository) ListAlert added in v0.6.0

func (_m *AlertRepository) ListAlert(_a0 context.Context, _a1 uint32, _a2 []string, _a3 []string, _a4 string, _a5 int64, _a6 int64) (*[]model.Alert, error)

ListAlert provides a mock function with given fields: _a0, _a1, _a2, _a3, _a4, _a5, _a6

func (*AlertRepository) ListAlertCondNotification added in v0.6.0

func (_m *AlertRepository) ListAlertCondNotification(_a0 context.Context, _a1 uint32, _a2 uint32, _a3 uint32, _a4 int64, _a5 int64) (*[]model.AlertCondNotification, error)

ListAlertCondNotification provides a mock function with given fields: _a0, _a1, _a2, _a3, _a4, _a5

func (*AlertRepository) ListAlertCondRule added in v0.6.0

func (_m *AlertRepository) ListAlertCondRule(_a0 context.Context, _a1 uint32, _a2 uint32, _a3 uint32, _a4 int64, _a5 int64) (*[]model.AlertCondRule, error)

ListAlertCondRule provides a mock function with given fields: _a0, _a1, _a2, _a3, _a4, _a5

func (*AlertRepository) ListAlertCondition added in v0.6.0

func (_m *AlertRepository) ListAlertCondition(_a0 context.Context, _a1 uint32, _a2 []string, _a3 bool, _a4 int64, _a5 int64) (*[]model.AlertCondition, error)

ListAlertCondition provides a mock function with given fields: _a0, _a1, _a2, _a3, _a4, _a5

func (*AlertRepository) ListAlertHistory added in v0.6.0

func (_m *AlertRepository) ListAlertHistory(_a0 context.Context, _a1 uint32, _a2 uint32, _a3 string, _a4 uint32) (*[]model.AlertHistory, error)

ListAlertHistory provides a mock function with given fields: _a0, _a1, _a2, _a3, _a4

func (*AlertRepository) ListAlertRule added in v0.6.0

func (_m *AlertRepository) ListAlertRule(_a0 context.Context, _a1 uint32, _a2 float32, _a3 float32, _a4 int64, _a5 int64) (*[]model.AlertRule, error)

ListAlertRule provides a mock function with given fields: _a0, _a1, _a2, _a3, _a4, _a5

func (*AlertRepository) ListAlertRuleByAlertConditionID added in v0.6.0

func (_m *AlertRepository) ListAlertRuleByAlertConditionID(_a0 context.Context, _a1 uint32, _a2 uint32) (*[]model.AlertRule, error)

ListAlertRuleByAlertConditionID provides a mock function with given fields: _a0, _a1, _a2

func (*AlertRepository) ListDisabledAlertCondition added in v0.6.0

func (_m *AlertRepository) ListDisabledAlertCondition(_a0 context.Context, _a1 uint32, _a2 []uint32) (*[]model.AlertCondition, error)

ListDisabledAlertCondition provides a mock function with given fields: _a0, _a1, _a2

func (*AlertRepository) ListEnabledAlertCondition added in v0.6.0

func (_m *AlertRepository) ListEnabledAlertCondition(_a0 context.Context, _a1 uint32, _a2 []uint32) (*[]model.AlertCondition, error)

ListEnabledAlertCondition provides a mock function with given fields: _a0, _a1, _a2

func (*AlertRepository) ListNotification added in v0.6.0

func (_m *AlertRepository) ListNotification(_a0 context.Context, _a1 uint32, _a2 string, _a3 int64, _a4 int64) (*[]model.Notification, error)

ListNotification provides a mock function with given fields: _a0, _a1, _a2, _a3, _a4

func (*AlertRepository) ListRelAlertFinding added in v0.6.0

func (_m *AlertRepository) ListRelAlertFinding(_a0 context.Context, _a1 uint32, _a2 uint32, _a3 uint64, _a4 int64, _a5 int64) (*[]model.RelAlertFinding, error)

ListRelAlertFinding provides a mock function with given fields: _a0, _a1, _a2, _a3, _a4, _a5

func (*AlertRepository) UpdateAlertFirstViewedAt added in v0.10.0

func (_m *AlertRepository) UpdateAlertFirstViewedAt(_a0 context.Context, _a1 uint32, _a2 uint32, _a3 int64) error

UpdateAlertFirstViewedAt provides a mock function with given fields: _a0, _a1, _a2, _a3

func (*AlertRepository) UpsertAlert added in v0.6.0

func (_m *AlertRepository) UpsertAlert(_a0 context.Context, _a1 *model.Alert) (*model.Alert, error)

UpsertAlert provides a mock function with given fields: _a0, _a1

func (*AlertRepository) UpsertAlertCondNotification added in v0.6.0

func (_m *AlertRepository) UpsertAlertCondNotification(_a0 context.Context, _a1 *model.AlertCondNotification) (*model.AlertCondNotification, error)

UpsertAlertCondNotification provides a mock function with given fields: _a0, _a1

func (*AlertRepository) UpsertAlertCondRule added in v0.6.0

func (_m *AlertRepository) UpsertAlertCondRule(_a0 context.Context, _a1 *model.AlertCondRule) (*model.AlertCondRule, error)

UpsertAlertCondRule provides a mock function with given fields: _a0, _a1

func (*AlertRepository) UpsertAlertCondition added in v0.6.0

func (_m *AlertRepository) UpsertAlertCondition(_a0 context.Context, _a1 *model.AlertCondition) (*model.AlertCondition, error)

UpsertAlertCondition provides a mock function with given fields: _a0, _a1

func (*AlertRepository) UpsertAlertHistory added in v0.6.0

func (_m *AlertRepository) UpsertAlertHistory(_a0 context.Context, _a1 *model.AlertHistory) (*model.AlertHistory, error)

UpsertAlertHistory provides a mock function with given fields: _a0, _a1

func (*AlertRepository) UpsertAlertRule added in v0.6.0

func (_m *AlertRepository) UpsertAlertRule(_a0 context.Context, _a1 *model.AlertRule) (*model.AlertRule, error)

UpsertAlertRule provides a mock function with given fields: _a0, _a1

func (*AlertRepository) UpsertNotification added in v0.6.0

func (_m *AlertRepository) UpsertNotification(_a0 context.Context, _a1 *model.Notification) (*model.Notification, error)

UpsertNotification provides a mock function with given fields: _a0, _a1

func (*AlertRepository) UpsertRelAlertFinding added in v0.6.0

func (_m *AlertRepository) UpsertRelAlertFinding(_a0 context.Context, _a1 *model.RelAlertFinding) (*model.RelAlertFinding, error)

UpsertRelAlertFinding provides a mock function with given fields: _a0, _a1

type FindingRepository added in v0.6.0

type FindingRepository struct {
	mock.Mock
}

FindingRepository is an autogenerated mock type for the FindingRepository type

func NewFindingRepository added in v0.6.0

func NewFindingRepository(t interface {
	mock.TestingT
	Cleanup(func())
}) *FindingRepository

NewFindingRepository creates a new instance of FindingRepository. 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 (*FindingRepository) BatchListFinding added in v0.6.0

func (_m *FindingRepository) BatchListFinding(_a0 context.Context, _a1 *finding.BatchListFindingRequest) (*[]model.Finding, error)

BatchListFinding provides a mock function with given fields: _a0, _a1

func (*FindingRepository) BulkUpsertFinding added in v0.6.0

func (_m *FindingRepository) BulkUpsertFinding(ctx context.Context, data []*model.Finding) error

BulkUpsertFinding provides a mock function with given fields: ctx, data

func (*FindingRepository) BulkUpsertFindingTag added in v0.6.0

func (_m *FindingRepository) BulkUpsertFindingTag(ctx context.Context, data []*model.FindingTag) error

BulkUpsertFindingTag provides a mock function with given fields: ctx, data

func (*FindingRepository) BulkUpsertRecommend added in v0.6.0

func (_m *FindingRepository) BulkUpsertRecommend(ctx context.Context, data []*model.Recommend) error

BulkUpsertRecommend provides a mock function with given fields: ctx, data

func (*FindingRepository) BulkUpsertRecommendFinding added in v0.6.0

func (_m *FindingRepository) BulkUpsertRecommendFinding(ctx context.Context, data []*model.RecommendFinding) error

BulkUpsertRecommendFinding provides a mock function with given fields: ctx, data

func (*FindingRepository) BulkUpsertResource added in v0.6.0

func (_m *FindingRepository) BulkUpsertResource(ctx context.Context, data []*model.Resource) error

BulkUpsertResource provides a mock function with given fields: ctx, data

func (*FindingRepository) BulkUpsertResourceTag added in v0.6.0

func (_m *FindingRepository) BulkUpsertResourceTag(ctx context.Context, data []*model.ResourceTag) error

BulkUpsertResourceTag provides a mock function with given fields: ctx, data

func (*FindingRepository) ClearScoreFinding added in v0.6.0

func (_m *FindingRepository) ClearScoreFinding(ctx context.Context, req *finding.ClearScoreRequest) error

ClearScoreFinding provides a mock function with given fields: ctx, req

func (*FindingRepository) DeleteFinding added in v0.6.0

func (_m *FindingRepository) DeleteFinding(_a0 context.Context, _a1 uint32, _a2 uint64) error

DeleteFinding provides a mock function with given fields: _a0, _a1, _a2

func (*FindingRepository) DeleteFindingSetting added in v0.6.0

func (_m *FindingRepository) DeleteFindingSetting(ctx context.Context, projectID uint32, findingSettingID uint32) error

DeleteFindingSetting provides a mock function with given fields: ctx, projectID, findingSettingID

func (*FindingRepository) DeleteNoFindingIdTag added in v0.9.0

func (_m *FindingRepository) DeleteNoFindingIdTag(ctx context.Context) error

DeleteNoFindingIdTag provides a mock function with given fields: ctx

func (*FindingRepository) DeleteNoResourceIdTag added in v0.9.0

func (_m *FindingRepository) DeleteNoResourceIdTag(ctx context.Context) error

DeleteNoResourceIdTag provides a mock function with given fields: ctx

func (*FindingRepository) DeleteOldFinding added in v0.9.0

func (_m *FindingRepository) DeleteOldFinding(ctx context.Context, excludeDataSource []string) error

DeleteOldFinding provides a mock function with given fields: ctx, excludeDataSource

func (*FindingRepository) DeleteOldResource added in v0.9.0

func (_m *FindingRepository) DeleteOldResource(ctx context.Context, excludeDataSource []string) error

DeleteOldResource provides a mock function with given fields: ctx, excludeDataSource

func (*FindingRepository) DeletePendFinding added in v0.6.0

func (_m *FindingRepository) DeletePendFinding(ctx context.Context, projectID uint32, findingID uint64) error

DeletePendFinding provides a mock function with given fields: ctx, projectID, findingID

func (*FindingRepository) DeleteResource added in v0.6.0

func (_m *FindingRepository) DeleteResource(_a0 context.Context, _a1 uint32, _a2 uint64) error

DeleteResource provides a mock function with given fields: _a0, _a1, _a2

func (*FindingRepository) GetFinding added in v0.6.0

func (_m *FindingRepository) GetFinding(_a0 context.Context, _a1 uint32, _a2 uint64, _a3 bool) (*model.Finding, error)

GetFinding provides a mock function with given fields: _a0, _a1, _a2, _a3

func (*FindingRepository) GetFindingByDataSource added in v0.6.0

func (_m *FindingRepository) GetFindingByDataSource(_a0 context.Context, _a1 uint32, _a2 string, _a3 string) (*model.Finding, error)

GetFindingByDataSource provides a mock function with given fields: _a0, _a1, _a2, _a3

func (*FindingRepository) GetFindingSetting added in v0.6.0

func (_m *FindingRepository) GetFindingSetting(ctx context.Context, projectID uint32, findingSettingID uint32) (*model.FindingSetting, error)

GetFindingSetting provides a mock function with given fields: ctx, projectID, findingSettingID

func (*FindingRepository) GetFindingSettingByResource added in v0.6.0

func (_m *FindingRepository) GetFindingSettingByResource(ctx context.Context, projectID uint32, resourceName string) (*model.FindingSetting, error)

GetFindingSettingByResource provides a mock function with given fields: ctx, projectID, resourceName

func (*FindingRepository) GetFindingTagByKey added in v0.6.0

func (_m *FindingRepository) GetFindingTagByKey(_a0 context.Context, _a1 uint32, _a2 uint64, _a3 string) (*model.FindingTag, error)

GetFindingTagByKey provides a mock function with given fields: _a0, _a1, _a2, _a3

func (*FindingRepository) GetPendFinding added in v0.6.0

func (_m *FindingRepository) GetPendFinding(ctx context.Context, projectID uint32, findingID uint64) (*model.PendFinding, error)

GetPendFinding provides a mock function with given fields: ctx, projectID, findingID

func (*FindingRepository) GetRecommend added in v0.6.0

func (_m *FindingRepository) GetRecommend(ctx context.Context, projectID uint32, findingID uint64) (*model.Recommend, error)

GetRecommend provides a mock function with given fields: ctx, projectID, findingID

func (*FindingRepository) GetRecommendByDataSourceType added in v0.6.0

func (_m *FindingRepository) GetRecommendByDataSourceType(ctx context.Context, dataSource string, recommendType string) (*model.Recommend, error)

GetRecommendByDataSourceType provides a mock function with given fields: ctx, dataSource, recommendType

func (*FindingRepository) GetResource added in v0.6.0

func (_m *FindingRepository) GetResource(_a0 context.Context, _a1 uint32, _a2 uint64) (*model.Resource, error)

GetResource provides a mock function with given fields: _a0, _a1, _a2

func (*FindingRepository) GetResourceByName added in v0.6.0

func (_m *FindingRepository) GetResourceByName(_a0 context.Context, _a1 uint32, _a2 string) (*model.Resource, error)

GetResourceByName provides a mock function with given fields: _a0, _a1, _a2

func (*FindingRepository) GetResourceTagByKey added in v0.6.0

func (_m *FindingRepository) GetResourceTagByKey(_a0 context.Context, _a1 uint32, _a2 uint64, _a3 string) (*model.ResourceTag, error)

GetResourceTagByKey provides a mock function with given fields: _a0, _a1, _a2, _a3

func (*FindingRepository) ListFinding added in v0.6.0

func (_m *FindingRepository) ListFinding(_a0 context.Context, _a1 *finding.ListFindingRequest) (*[]model.Finding, error)

ListFinding provides a mock function with given fields: _a0, _a1

func (*FindingRepository) ListFindingCount added in v0.6.0

func (_m *FindingRepository) ListFindingCount(ctx context.Context, projectID uint32, alertID uint32, fromScore float32, toScore float32, findingID uint64, dataSources []string, resourceNames []string, tags []string, status finding.FindingStatus) (int64, error)

ListFindingCount provides a mock function with given fields: ctx, projectID, alertID, fromScore, toScore, findingID, dataSources, resourceNames, tags, status

func (*FindingRepository) ListFindingSetting added in v0.6.0

ListFindingSetting provides a mock function with given fields: ctx, req

func (*FindingRepository) ListFindingTag added in v0.6.0

func (_m *FindingRepository) ListFindingTag(ctx context.Context, param *finding.ListFindingTagRequest) (*[]model.FindingTag, error)

ListFindingTag provides a mock function with given fields: ctx, param

func (*FindingRepository) ListFindingTagByFindingID added in v0.6.0

func (_m *FindingRepository) ListFindingTagByFindingID(ctx context.Context, projectID uint32, findingID uint64) (*[]model.FindingTag, error)

ListFindingTagByFindingID provides a mock function with given fields: ctx, projectID, findingID

func (*FindingRepository) ListFindingTagCount added in v0.6.0

func (_m *FindingRepository) ListFindingTagCount(ctx context.Context, param *finding.ListFindingTagRequest) (int64, error)

ListFindingTagCount provides a mock function with given fields: ctx, param

func (*FindingRepository) ListFindingTagName added in v0.6.0

func (_m *FindingRepository) ListFindingTagName(ctx context.Context, param *finding.ListFindingTagNameRequest) (*[]db.TagName, error)

ListFindingTagName provides a mock function with given fields: ctx, param

func (*FindingRepository) ListFindingTagNameCount added in v0.6.0

func (_m *FindingRepository) ListFindingTagNameCount(ctx context.Context, param *finding.ListFindingTagNameRequest) (int64, error)

ListFindingTagNameCount provides a mock function with given fields: ctx, param

func (*FindingRepository) ListResource added in v0.6.0

func (_m *FindingRepository) ListResource(_a0 context.Context, _a1 *finding.ListResourceRequest) (*[]model.Resource, error)

ListResource provides a mock function with given fields: _a0, _a1

func (*FindingRepository) ListResourceCount added in v0.6.0

func (_m *FindingRepository) ListResourceCount(ctx context.Context, req *finding.ListResourceRequest) (int64, error)

ListResourceCount provides a mock function with given fields: ctx, req

func (*FindingRepository) ListResourceTag added in v0.6.0

func (_m *FindingRepository) ListResourceTag(ctx context.Context, param *finding.ListResourceTagRequest) (*[]model.ResourceTag, error)

ListResourceTag provides a mock function with given fields: ctx, param

func (*FindingRepository) ListResourceTagByResourceID added in v0.6.0

func (_m *FindingRepository) ListResourceTagByResourceID(ctx context.Context, projectID uint32, resourceID uint64) (*[]model.ResourceTag, error)

ListResourceTagByResourceID provides a mock function with given fields: ctx, projectID, resourceID

func (*FindingRepository) ListResourceTagCount added in v0.6.0

func (_m *FindingRepository) ListResourceTagCount(ctx context.Context, param *finding.ListResourceTagRequest) (int64, error)

ListResourceTagCount provides a mock function with given fields: ctx, param

func (*FindingRepository) ListResourceTagName added in v0.6.0

func (_m *FindingRepository) ListResourceTagName(ctx context.Context, param *finding.ListResourceTagNameRequest) (*[]db.TagName, error)

ListResourceTagName provides a mock function with given fields: ctx, param

func (*FindingRepository) ListResourceTagNameCount added in v0.6.0

func (_m *FindingRepository) ListResourceTagNameCount(ctx context.Context, param *finding.ListResourceTagNameRequest) (int64, error)

ListResourceTagNameCount provides a mock function with given fields: ctx, param

func (*FindingRepository) TagFinding added in v0.6.0

func (_m *FindingRepository) TagFinding(_a0 context.Context, _a1 *model.FindingTag) (*model.FindingTag, error)

TagFinding provides a mock function with given fields: _a0, _a1

func (*FindingRepository) TagResource added in v0.6.0

func (_m *FindingRepository) TagResource(_a0 context.Context, _a1 *model.ResourceTag) (*model.ResourceTag, error)

TagResource provides a mock function with given fields: _a0, _a1

func (*FindingRepository) UntagFinding added in v0.6.0

func (_m *FindingRepository) UntagFinding(_a0 context.Context, _a1 uint32, _a2 uint64) error

UntagFinding provides a mock function with given fields: _a0, _a1, _a2

func (*FindingRepository) UntagResource added in v0.6.0

func (_m *FindingRepository) UntagResource(_a0 context.Context, _a1 uint32, _a2 uint64) error

UntagResource provides a mock function with given fields: _a0, _a1, _a2

func (*FindingRepository) UpsertFinding added in v0.6.0

func (_m *FindingRepository) UpsertFinding(_a0 context.Context, _a1 *model.Finding) (*model.Finding, error)

UpsertFinding provides a mock function with given fields: _a0, _a1

func (*FindingRepository) UpsertFindingSetting added in v0.6.0

func (_m *FindingRepository) UpsertFindingSetting(ctx context.Context, data *model.FindingSetting) (*model.FindingSetting, error)

UpsertFindingSetting provides a mock function with given fields: ctx, data

func (*FindingRepository) UpsertPendFinding added in v0.6.0

func (_m *FindingRepository) UpsertPendFinding(ctx context.Context, findingID uint64, projectID uint32, note string, reason string, expiredAtInt int64) (*model.PendFinding, error)

UpsertPendFinding provides a mock function with given fields: ctx, findingID, projectID, note, reason, expiredAtInt

func (*FindingRepository) UpsertRecommend added in v0.6.0

func (_m *FindingRepository) UpsertRecommend(ctx context.Context, data *model.Recommend) (*model.Recommend, error)

UpsertRecommend provides a mock function with given fields: ctx, data

func (*FindingRepository) UpsertRecommendFinding added in v0.6.0

func (_m *FindingRepository) UpsertRecommendFinding(ctx context.Context, data *model.RecommendFinding) (*model.RecommendFinding, error)

UpsertRecommendFinding provides a mock function with given fields: ctx, data

func (*FindingRepository) UpsertResource added in v0.6.0

func (_m *FindingRepository) UpsertResource(_a0 context.Context, _a1 *model.Resource) (*model.Resource, error)

UpsertResource provides a mock function with given fields: _a0, _a1

type IAMRepository added in v0.6.0

type IAMRepository struct {
	mock.Mock
}

IAMRepository is an autogenerated mock type for the IAMRepository type

func NewIAMRepository added in v0.6.0

func NewIAMRepository(t interface {
	mock.TestingT
	Cleanup(func())
}) *IAMRepository

NewIAMRepository creates a new instance of IAMRepository. 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 (*IAMRepository) AttachAccessTokenRole added in v0.6.0

func (_m *IAMRepository) AttachAccessTokenRole(ctx context.Context, projectID uint32, roleID uint32, accessTokenID uint32) (*model.AccessTokenRole, error)

AttachAccessTokenRole provides a mock function with given fields: ctx, projectID, roleID, accessTokenID

func (*IAMRepository) AttachAllAdminRole added in v0.6.0

func (_m *IAMRepository) AttachAllAdminRole(ctx context.Context, userID uint32) error

AttachAllAdminRole provides a mock function with given fields: ctx, userID

func (*IAMRepository) AttachPolicy added in v0.6.0

func (_m *IAMRepository) AttachPolicy(ctx context.Context, projectID uint32, roleID uint32, policyID uint32) (*model.RolePolicy, error)

AttachPolicy provides a mock function with given fields: ctx, projectID, roleID, policyID

func (*IAMRepository) AttachRole added in v0.6.0

func (_m *IAMRepository) AttachRole(ctx context.Context, projectID uint32, roleID uint32, userID uint32) (*model.UserRole, error)

AttachRole provides a mock function with given fields: ctx, projectID, roleID, userID

func (*IAMRepository) CreateUser added in v0.6.0

func (_m *IAMRepository) CreateUser(ctx context.Context, u *model.User) (*model.User, error)

CreateUser provides a mock function with given fields: ctx, u

func (*IAMRepository) DeleteAccessToken added in v0.6.0

func (_m *IAMRepository) DeleteAccessToken(ctx context.Context, projectID uint32, accessTokenID uint32) error

DeleteAccessToken provides a mock function with given fields: ctx, projectID, accessTokenID

func (*IAMRepository) DeletePolicy added in v0.6.0

func (_m *IAMRepository) DeletePolicy(ctx context.Context, projectID uint32, policyID uint32) error

DeletePolicy provides a mock function with given fields: ctx, projectID, policyID

func (*IAMRepository) DeleteRole added in v0.6.0

func (_m *IAMRepository) DeleteRole(ctx context.Context, projectID uint32, roleID uint32) error

DeleteRole provides a mock function with given fields: ctx, projectID, roleID

func (*IAMRepository) DeleteUserReserved added in v0.6.0

func (_m *IAMRepository) DeleteUserReserved(ctx context.Context, projectID uint32, reservedID uint32) error

DeleteUserReserved provides a mock function with given fields: ctx, projectID, reservedID

func (*IAMRepository) DetachAccessTokenRole added in v0.6.0

func (_m *IAMRepository) DetachAccessTokenRole(ctx context.Context, projectID uint32, roleID uint32, accessTokenID uint32) error

DetachAccessTokenRole provides a mock function with given fields: ctx, projectID, roleID, accessTokenID

func (*IAMRepository) DetachPolicy added in v0.6.0

func (_m *IAMRepository) DetachPolicy(ctx context.Context, projectID uint32, roleID uint32, policyID uint32) error

DetachPolicy provides a mock function with given fields: ctx, projectID, roleID, policyID

func (*IAMRepository) DetachRole added in v0.6.0

func (_m *IAMRepository) DetachRole(ctx context.Context, projectID uint32, roleID uint32, userID uint32) error

DetachRole provides a mock function with given fields: ctx, projectID, roleID, userID

func (*IAMRepository) ExistsAccessTokenMaintainer added in v0.6.0

func (_m *IAMRepository) ExistsAccessTokenMaintainer(ctx context.Context, projectID uint32, accessTokenID uint32) (bool, error)

ExistsAccessTokenMaintainer provides a mock function with given fields: ctx, projectID, accessTokenID

func (*IAMRepository) GetAccessTokenByUniqueKey added in v0.6.0

func (_m *IAMRepository) GetAccessTokenByUniqueKey(ctx context.Context, projectID uint32, name string) (*model.AccessToken, error)

GetAccessTokenByUniqueKey provides a mock function with given fields: ctx, projectID, name

func (*IAMRepository) GetActiveAccessTokenHash added in v0.6.0

func (_m *IAMRepository) GetActiveAccessTokenHash(ctx context.Context, projectID uint32, accessTokenID uint32, tokenHash string) (*model.AccessToken, error)

GetActiveAccessTokenHash provides a mock function with given fields: ctx, projectID, accessTokenID, tokenHash

func (*IAMRepository) GetActiveUserCount added in v0.6.0

func (_m *IAMRepository) GetActiveUserCount(ctx context.Context) (*int, error)

GetActiveUserCount provides a mock function with given fields: ctx

func (*IAMRepository) GetAdminPolicy added in v0.6.0

func (_m *IAMRepository) GetAdminPolicy(ctx context.Context, userID uint32) (*[]model.Policy, error)

GetAdminPolicy provides a mock function with given fields: ctx, userID

func (*IAMRepository) GetPolicy added in v0.6.0

func (_m *IAMRepository) GetPolicy(ctx context.Context, projectID uint32, policyID uint32) (*model.Policy, error)

GetPolicy provides a mock function with given fields: ctx, projectID, policyID

func (*IAMRepository) GetPolicyByName added in v0.6.0

func (_m *IAMRepository) GetPolicyByName(ctx context.Context, projectID uint32, name string) (*model.Policy, error)

GetPolicyByName provides a mock function with given fields: ctx, projectID, name

func (*IAMRepository) GetRole added in v0.6.0

func (_m *IAMRepository) GetRole(ctx context.Context, projectID uint32, roleID uint32) (*model.Role, error)

GetRole provides a mock function with given fields: ctx, projectID, roleID

func (*IAMRepository) GetRoleByName added in v0.6.0

func (_m *IAMRepository) GetRoleByName(ctx context.Context, projectID uint32, name string) (*model.Role, error)

GetRoleByName provides a mock function with given fields: ctx, projectID, name

func (*IAMRepository) GetTokenPolicy added in v0.6.0

func (_m *IAMRepository) GetTokenPolicy(ctx context.Context, accessTokenID uint32) (*[]model.Policy, error)

GetTokenPolicy provides a mock function with given fields: ctx, accessTokenID

func (*IAMRepository) GetUser added in v0.6.0

func (_m *IAMRepository) GetUser(ctx context.Context, userID uint32, sub string) (*model.User, error)

GetUser provides a mock function with given fields: ctx, userID, sub

func (*IAMRepository) GetUserBySub added in v0.6.0

func (_m *IAMRepository) GetUserBySub(ctx context.Context, sub string) (*model.User, error)

GetUserBySub provides a mock function with given fields: ctx, sub

func (*IAMRepository) GetUserByUserIdpKey added in v0.6.0

func (_m *IAMRepository) GetUserByUserIdpKey(ctx context.Context, userIdpKey string) (*model.User, error)

GetUserByUserIdpKey provides a mock function with given fields: ctx, userIdpKey

func (*IAMRepository) GetUserPolicy added in v0.6.0

func (_m *IAMRepository) GetUserPolicy(ctx context.Context, userID uint32) (*[]model.Policy, error)

GetUserPolicy provides a mock function with given fields: ctx, userID

func (*IAMRepository) ListAccessToken added in v0.6.0

func (_m *IAMRepository) ListAccessToken(ctx context.Context, projectID uint32, name string, accessTokenID uint32) (*[]model.AccessToken, error)

ListAccessToken provides a mock function with given fields: ctx, projectID, name, accessTokenID

func (*IAMRepository) ListExpiredAccessToken added in v0.6.0

func (_m *IAMRepository) ListExpiredAccessToken(ctx context.Context) (*[]model.AccessToken, error)

ListExpiredAccessToken provides a mock function with given fields: ctx

func (*IAMRepository) ListPolicy added in v0.6.0

func (_m *IAMRepository) ListPolicy(ctx context.Context, projectID uint32, name string, roleID uint32) (*[]model.Policy, error)

ListPolicy provides a mock function with given fields: ctx, projectID, name, roleID

func (*IAMRepository) ListRole added in v0.6.0

func (_m *IAMRepository) ListRole(ctx context.Context, projectID uint32, name string, userID uint32, accessTokenID uint32) (*[]model.Role, error)

ListRole provides a mock function with given fields: ctx, projectID, name, userID, accessTokenID

func (*IAMRepository) ListUser added in v0.6.0

func (_m *IAMRepository) ListUser(ctx context.Context, activated bool, projectID uint32, name string, userID uint32, admin bool) (*[]model.User, error)

ListUser provides a mock function with given fields: ctx, activated, projectID, name, userID, admin

func (*IAMRepository) ListUserReserved added in v0.6.0

func (_m *IAMRepository) ListUserReserved(ctx context.Context, projectID uint32, userIdpKey string) (*[]model.UserReserved, error)

ListUserReserved provides a mock function with given fields: ctx, projectID, userIdpKey

func (*IAMRepository) ListUserReservedWithProjectID added in v0.6.0

func (_m *IAMRepository) ListUserReservedWithProjectID(ctx context.Context, userIdpKey string) (*[]db.UserReservedWithProjectID, error)

ListUserReservedWithProjectID provides a mock function with given fields: ctx, userIdpKey

func (*IAMRepository) PutAccessToken added in v0.6.0

func (_m *IAMRepository) PutAccessToken(ctx context.Context, r *model.AccessToken) (*model.AccessToken, error)

PutAccessToken provides a mock function with given fields: ctx, r

func (*IAMRepository) PutPolicy added in v0.6.0

func (_m *IAMRepository) PutPolicy(ctx context.Context, p *model.Policy) (*model.Policy, error)

PutPolicy provides a mock function with given fields: ctx, p

func (*IAMRepository) PutRole added in v0.6.0

func (_m *IAMRepository) PutRole(ctx context.Context, r *model.Role) (*model.Role, error)

PutRole provides a mock function with given fields: ctx, r

func (*IAMRepository) PutUser added in v0.6.0

func (_m *IAMRepository) PutUser(ctx context.Context, u *model.User) (*model.User, error)

PutUser provides a mock function with given fields: ctx, u

func (*IAMRepository) PutUserReserved added in v0.6.0

func (_m *IAMRepository) PutUserReserved(ctx context.Context, u *model.UserReserved) (*model.UserReserved, error)

PutUserReserved provides a mock function with given fields: ctx, u

type ProjectRepository added in v0.6.0

type ProjectRepository struct {
	mock.Mock
}

ProjectRepository is an autogenerated mock type for the ProjectRepository type

func NewProjectRepository added in v0.6.0

func NewProjectRepository(t interface {
	mock.TestingT
	Cleanup(func())
}) *ProjectRepository

NewProjectRepository creates a new instance of ProjectRepository. 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 (*ProjectRepository) CleanWithNoProject added in v0.6.0

func (_m *ProjectRepository) CleanWithNoProject(_a0 context.Context) error

CleanWithNoProject provides a mock function with given fields: _a0

func (*ProjectRepository) CreateProject added in v0.6.0

func (_m *ProjectRepository) CreateProject(ctx context.Context, name string) (*model.Project, error)

CreateProject provides a mock function with given fields: ctx, name

func (*ProjectRepository) DeleteProject added in v0.6.0

func (_m *ProjectRepository) DeleteProject(ctx context.Context, projectID uint32) error

DeleteProject provides a mock function with given fields: ctx, projectID

func (*ProjectRepository) ListProject added in v0.6.0

func (_m *ProjectRepository) ListProject(ctx context.Context, userID uint32, projectID uint32, name string) (*[]db.ProjectWithTag, error)

ListProject provides a mock function with given fields: ctx, userID, projectID, name

func (*ProjectRepository) TagProject added in v0.6.0

func (_m *ProjectRepository) TagProject(ctx context.Context, projectID uint32, tag string, color string) (*model.ProjectTag, error)

TagProject provides a mock function with given fields: ctx, projectID, tag, color

func (*ProjectRepository) UntagProject added in v0.6.0

func (_m *ProjectRepository) UntagProject(ctx context.Context, projectID uint32, tag string) error

UntagProject provides a mock function with given fields: ctx, projectID, tag

func (*ProjectRepository) UpdateProject added in v0.6.0

func (_m *ProjectRepository) UpdateProject(ctx context.Context, projectID uint32, name string) (*model.Project, error)

UpdateProject provides a mock function with given fields: ctx, projectID, name

type ReportRepository added in v0.6.0

type ReportRepository struct {
	mock.Mock
}

ReportRepository is an autogenerated mock type for the ReportRepository type

func NewReportRepository added in v0.6.0

func NewReportRepository(t interface {
	mock.TestingT
	Cleanup(func())
}) *ReportRepository

NewReportRepository creates a new instance of ReportRepository. 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 (*ReportRepository) CollectReportFinding added in v0.6.0

func (_m *ReportRepository) CollectReportFinding(ctx context.Context) error

CollectReportFinding provides a mock function with given fields: ctx

func (*ReportRepository) GetReportFinding added in v0.6.0

func (_m *ReportRepository) GetReportFinding(_a0 context.Context, _a1 uint32, _a2 []string, _a3 string, _a4 string, _a5 float32) (*[]model.ReportFinding, error)

GetReportFinding provides a mock function with given fields: _a0, _a1, _a2, _a3, _a4, _a5

func (*ReportRepository) GetReportFindingAll added in v0.6.0

func (_m *ReportRepository) GetReportFindingAll(_a0 context.Context, _a1 []string, _a2 string, _a3 string, _a4 float32) (*[]model.ReportFinding, error)

GetReportFindingAll provides a mock function with given fields: _a0, _a1, _a2, _a3, _a4

func (*ReportRepository) PurgeReportFinding added in v0.7.0

func (_m *ReportRepository) PurgeReportFinding(ctx context.Context) error

PurgeReportFinding provides a mock function with given fields: ctx

Jump to

Keyboard shortcuts

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