db

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package db is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB interface {
	Connect() error
	Disconnect() error
	CollectionExists(name string) (bool, error)

	GetRequestsByUserID(id, requestType string) ([]models.Request, error)
	NewRequest(request *models.Request) (string, error)
	GetRequestByGroupIDAndUserID(groupID, userID string) ([]models.Request, error)
	GetRequestByID(string) (*models.Request, error)
	DeleteRequest(string) error
	UpdateRequestState(id string, state models.RequestStateType) error
	UpdateRequestStateWithComment(id string, state models.RequestStateType, comment string) error
	GetRequestByServiceName(string) ([]models.Request, error)

	GetKeyByID(id string) (*models.Key, error)
	GetKeyByUserID(userid string) ([]models.Key, error)
	CreateKey(key *models.Key) error
	DeleteKey(string) error

	// Implementations for group quota.
	NewQuota(*models.Quota) error
	UpdateQuota(*models.Quota) error
	DeleteQuota(string) error
	GetQuotaForGroupID(string) (*models.Quota, error)
	GetGroupsQuota([]string) ([]models.Quota, error)

	NewEvent(*models.Event) error
	GetEventsByUserID(string, int64, int64) ([]models.Event, int64, error)
	GetEventsByType(models.EventType, uint) ([]models.Event, int64, error)
	WatchEvents(chan<- *models.Event) error
	MarkEventAsNotified(string) error
	SetEventCapping(int64) error

	AcceptTermsAndConditions(*models.TermsAndConditions) error
	GetTermsAndConditionsByUserID(string) (*models.TermsAndConditions, error)
	DeleteTermsAndConditionsByUserID(string) error

	InsertFeedback(*models.Feedback) error
	GetFeedbacks(models.FeedbacksFilter, int64, int64) ([]models.Feedback, int64, error)
}

type MockDB added in v0.5.0

type MockDB struct {
	// contains filtered or unexported fields
}

MockDB is a mock of DB interface.

func NewMockDB added in v0.5.0

func NewMockDB(ctrl *gomock.Controller) *MockDB

NewMockDB creates a new mock instance.

func (*MockDB) AcceptTermsAndConditions added in v0.5.0

func (m *MockDB) AcceptTermsAndConditions(arg0 *models.TermsAndConditions) error

AcceptTermsAndConditions mocks base method.

func (*MockDB) CollectionExists added in v0.5.1

func (m *MockDB) CollectionExists(arg0 string) (bool, error)

CollectionExists mocks base method.

func (*MockDB) Connect added in v0.5.0

func (m *MockDB) Connect() error

Connect mocks base method.

func (*MockDB) CreateKey added in v0.5.0

func (m *MockDB) CreateKey(arg0 *models.Key) error

CreateKey mocks base method.

func (*MockDB) DeleteKey added in v0.5.0

func (m *MockDB) DeleteKey(arg0 string) error

DeleteKey mocks base method.

func (*MockDB) DeleteQuota added in v0.5.0

func (m *MockDB) DeleteQuota(arg0 string) error

DeleteQuota mocks base method.

func (*MockDB) DeleteRequest added in v0.5.0

func (m *MockDB) DeleteRequest(arg0 string) error

DeleteRequest mocks base method.

func (*MockDB) DeleteTermsAndConditionsByUserID added in v0.5.0

func (m *MockDB) DeleteTermsAndConditionsByUserID(arg0 string) error

DeleteTermsAndConditionsByUserID mocks base method.

func (*MockDB) Disconnect added in v0.5.0

func (m *MockDB) Disconnect() error

Disconnect mocks base method.

func (*MockDB) EXPECT added in v0.5.0

func (m *MockDB) EXPECT() *MockDBMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockDB) GetEventsByType added in v0.5.0

func (m *MockDB) GetEventsByType(arg0 models.EventType, arg1 uint) ([]models.Event, int64, error)

GetEventsByType mocks base method.

func (*MockDB) GetEventsByUserID added in v0.5.0

func (m *MockDB) GetEventsByUserID(arg0 string, arg1, arg2 int64) ([]models.Event, int64, error)

GetEventsByUserID mocks base method.

func (*MockDB) GetFeedbacks added in v0.5.0

func (m *MockDB) GetFeedbacks(arg0 models.FeedbacksFilter, arg1, arg2 int64) ([]models.Feedback, int64, error)

GetFeedbacks mocks base method.

func (*MockDB) GetGroupsQuota added in v0.5.0

func (m *MockDB) GetGroupsQuota(arg0 []string) ([]models.Quota, error)

GetGroupsQuota mocks base method.

func (*MockDB) GetKeyByID added in v0.5.0

func (m *MockDB) GetKeyByID(arg0 string) (*models.Key, error)

GetKeyByID mocks base method.

func (*MockDB) GetKeyByUserID added in v0.5.0

func (m *MockDB) GetKeyByUserID(arg0 string) ([]models.Key, error)

GetKeyByUserID mocks base method.

func (*MockDB) GetQuotaForGroupID added in v0.5.0

func (m *MockDB) GetQuotaForGroupID(arg0 string) (*models.Quota, error)

GetQuotaForGroupID mocks base method.

func (*MockDB) GetRequestByGroupIDAndUserID added in v0.5.0

func (m *MockDB) GetRequestByGroupIDAndUserID(arg0, arg1 string) ([]models.Request, error)

GetRequestByGroupIDAndUserID mocks base method.

func (*MockDB) GetRequestByID added in v0.5.0

func (m *MockDB) GetRequestByID(arg0 string) (*models.Request, error)

GetRequestByID mocks base method.

func (*MockDB) GetRequestByServiceName added in v0.5.0

func (m *MockDB) GetRequestByServiceName(arg0 string) ([]models.Request, error)

GetRequestByServiceName mocks base method.

func (*MockDB) GetRequestsByUserID added in v0.5.0

func (m *MockDB) GetRequestsByUserID(arg0, arg1 string) ([]models.Request, error)

GetRequestsByUserID mocks base method.

func (*MockDB) GetTermsAndConditionsByUserID added in v0.5.0

func (m *MockDB) GetTermsAndConditionsByUserID(arg0 string) (*models.TermsAndConditions, error)

GetTermsAndConditionsByUserID mocks base method.

func (*MockDB) InsertFeedback added in v0.5.0

func (m *MockDB) InsertFeedback(arg0 *models.Feedback) error

InsertFeedback mocks base method.

func (*MockDB) MarkEventAsNotified added in v0.5.0

func (m *MockDB) MarkEventAsNotified(arg0 string) error

MarkEventAsNotified mocks base method.

func (*MockDB) NewEvent added in v0.5.0

func (m *MockDB) NewEvent(arg0 *models.Event) error

NewEvent mocks base method.

func (*MockDB) NewQuota added in v0.5.0

func (m *MockDB) NewQuota(arg0 *models.Quota) error

NewQuota mocks base method.

func (*MockDB) NewRequest added in v0.5.0

func (m *MockDB) NewRequest(arg0 *models.Request) (string, error)

NewRequest mocks base method.

func (*MockDB) SetEventCapping added in v0.5.0

func (m *MockDB) SetEventCapping(arg0 int64) error

SetEventCapping mocks base method.

func (*MockDB) UpdateQuota added in v0.5.0

func (m *MockDB) UpdateQuota(arg0 *models.Quota) error

UpdateQuota mocks base method.

func (*MockDB) UpdateRequestState added in v0.5.0

func (m *MockDB) UpdateRequestState(arg0 string, arg1 models.RequestStateType) error

UpdateRequestState mocks base method.

func (*MockDB) UpdateRequestStateWithComment added in v0.5.0

func (m *MockDB) UpdateRequestStateWithComment(arg0 string, arg1 models.RequestStateType, arg2 string) error

UpdateRequestStateWithComment mocks base method.

func (*MockDB) WatchEvents added in v0.5.0

func (m *MockDB) WatchEvents(arg0 chan<- *models.Event) error

WatchEvents mocks base method.

type MockDBMockRecorder added in v0.5.0

type MockDBMockRecorder struct {
	// contains filtered or unexported fields
}

MockDBMockRecorder is the mock recorder for MockDB.

func (*MockDBMockRecorder) AcceptTermsAndConditions added in v0.5.0

func (mr *MockDBMockRecorder) AcceptTermsAndConditions(arg0 interface{}) *gomock.Call

AcceptTermsAndConditions indicates an expected call of AcceptTermsAndConditions.

func (*MockDBMockRecorder) CollectionExists added in v0.5.1

func (mr *MockDBMockRecorder) CollectionExists(arg0 interface{}) *gomock.Call

CollectionExists indicates an expected call of CollectionExists.

func (*MockDBMockRecorder) Connect added in v0.5.0

func (mr *MockDBMockRecorder) Connect() *gomock.Call

Connect indicates an expected call of Connect.

func (*MockDBMockRecorder) CreateKey added in v0.5.0

func (mr *MockDBMockRecorder) CreateKey(arg0 interface{}) *gomock.Call

CreateKey indicates an expected call of CreateKey.

func (*MockDBMockRecorder) DeleteKey added in v0.5.0

func (mr *MockDBMockRecorder) DeleteKey(arg0 interface{}) *gomock.Call

DeleteKey indicates an expected call of DeleteKey.

func (*MockDBMockRecorder) DeleteQuota added in v0.5.0

func (mr *MockDBMockRecorder) DeleteQuota(arg0 interface{}) *gomock.Call

DeleteQuota indicates an expected call of DeleteQuota.

func (*MockDBMockRecorder) DeleteRequest added in v0.5.0

func (mr *MockDBMockRecorder) DeleteRequest(arg0 interface{}) *gomock.Call

DeleteRequest indicates an expected call of DeleteRequest.

func (*MockDBMockRecorder) DeleteTermsAndConditionsByUserID added in v0.5.0

func (mr *MockDBMockRecorder) DeleteTermsAndConditionsByUserID(arg0 interface{}) *gomock.Call

DeleteTermsAndConditionsByUserID indicates an expected call of DeleteTermsAndConditionsByUserID.

func (*MockDBMockRecorder) Disconnect added in v0.5.0

func (mr *MockDBMockRecorder) Disconnect() *gomock.Call

Disconnect indicates an expected call of Disconnect.

func (*MockDBMockRecorder) GetEventsByType added in v0.5.0

func (mr *MockDBMockRecorder) GetEventsByType(arg0, arg1 interface{}) *gomock.Call

GetEventsByType indicates an expected call of GetEventsByType.

func (*MockDBMockRecorder) GetEventsByUserID added in v0.5.0

func (mr *MockDBMockRecorder) GetEventsByUserID(arg0, arg1, arg2 interface{}) *gomock.Call

GetEventsByUserID indicates an expected call of GetEventsByUserID.

func (*MockDBMockRecorder) GetFeedbacks added in v0.5.0

func (mr *MockDBMockRecorder) GetFeedbacks(arg0, arg1, arg2 interface{}) *gomock.Call

GetFeedbacks indicates an expected call of GetFeedbacks.

func (*MockDBMockRecorder) GetGroupsQuota added in v0.5.0

func (mr *MockDBMockRecorder) GetGroupsQuota(arg0 interface{}) *gomock.Call

GetGroupsQuota indicates an expected call of GetGroupsQuota.

func (*MockDBMockRecorder) GetKeyByID added in v0.5.0

func (mr *MockDBMockRecorder) GetKeyByID(arg0 interface{}) *gomock.Call

GetKeyByID indicates an expected call of GetKeyByID.

func (*MockDBMockRecorder) GetKeyByUserID added in v0.5.0

func (mr *MockDBMockRecorder) GetKeyByUserID(arg0 interface{}) *gomock.Call

GetKeyByUserID indicates an expected call of GetKeyByUserID.

func (*MockDBMockRecorder) GetQuotaForGroupID added in v0.5.0

func (mr *MockDBMockRecorder) GetQuotaForGroupID(arg0 interface{}) *gomock.Call

GetQuotaForGroupID indicates an expected call of GetQuotaForGroupID.

func (*MockDBMockRecorder) GetRequestByGroupIDAndUserID added in v0.5.0

func (mr *MockDBMockRecorder) GetRequestByGroupIDAndUserID(arg0, arg1 interface{}) *gomock.Call

GetRequestByGroupIDAndUserID indicates an expected call of GetRequestByGroupIDAndUserID.

func (*MockDBMockRecorder) GetRequestByID added in v0.5.0

func (mr *MockDBMockRecorder) GetRequestByID(arg0 interface{}) *gomock.Call

GetRequestByID indicates an expected call of GetRequestByID.

func (*MockDBMockRecorder) GetRequestByServiceName added in v0.5.0

func (mr *MockDBMockRecorder) GetRequestByServiceName(arg0 interface{}) *gomock.Call

GetRequestByServiceName indicates an expected call of GetRequestByServiceName.

func (*MockDBMockRecorder) GetRequestsByUserID added in v0.5.0

func (mr *MockDBMockRecorder) GetRequestsByUserID(arg0, arg1 interface{}) *gomock.Call

GetRequestsByUserID indicates an expected call of GetRequestsByUserID.

func (*MockDBMockRecorder) GetTermsAndConditionsByUserID added in v0.5.0

func (mr *MockDBMockRecorder) GetTermsAndConditionsByUserID(arg0 interface{}) *gomock.Call

GetTermsAndConditionsByUserID indicates an expected call of GetTermsAndConditionsByUserID.

func (*MockDBMockRecorder) InsertFeedback added in v0.5.0

func (mr *MockDBMockRecorder) InsertFeedback(arg0 interface{}) *gomock.Call

InsertFeedback indicates an expected call of InsertFeedback.

func (*MockDBMockRecorder) MarkEventAsNotified added in v0.5.0

func (mr *MockDBMockRecorder) MarkEventAsNotified(arg0 interface{}) *gomock.Call

MarkEventAsNotified indicates an expected call of MarkEventAsNotified.

func (*MockDBMockRecorder) NewEvent added in v0.5.0

func (mr *MockDBMockRecorder) NewEvent(arg0 interface{}) *gomock.Call

NewEvent indicates an expected call of NewEvent.

func (*MockDBMockRecorder) NewQuota added in v0.5.0

func (mr *MockDBMockRecorder) NewQuota(arg0 interface{}) *gomock.Call

NewQuota indicates an expected call of NewQuota.

func (*MockDBMockRecorder) NewRequest added in v0.5.0

func (mr *MockDBMockRecorder) NewRequest(arg0 interface{}) *gomock.Call

NewRequest indicates an expected call of NewRequest.

func (*MockDBMockRecorder) SetEventCapping added in v0.5.0

func (mr *MockDBMockRecorder) SetEventCapping(arg0 interface{}) *gomock.Call

SetEventCapping indicates an expected call of SetEventCapping.

func (*MockDBMockRecorder) UpdateQuota added in v0.5.0

func (mr *MockDBMockRecorder) UpdateQuota(arg0 interface{}) *gomock.Call

UpdateQuota indicates an expected call of UpdateQuota.

func (*MockDBMockRecorder) UpdateRequestState added in v0.5.0

func (mr *MockDBMockRecorder) UpdateRequestState(arg0, arg1 interface{}) *gomock.Call

UpdateRequestState indicates an expected call of UpdateRequestState.

func (*MockDBMockRecorder) UpdateRequestStateWithComment added in v0.5.0

func (mr *MockDBMockRecorder) UpdateRequestStateWithComment(arg0, arg1, arg2 interface{}) *gomock.Call

UpdateRequestStateWithComment indicates an expected call of UpdateRequestStateWithComment.

func (*MockDBMockRecorder) WatchEvents added in v0.5.0

func (mr *MockDBMockRecorder) WatchEvents(arg0 interface{}) *gomock.Call

WatchEvents indicates an expected call of WatchEvents.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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