mocks

package
v0.0.0-...-661a7f9 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileRepository

type FileRepository struct {
	mock.Mock
}

FileRepository is an autogenerated mock type for the FileRepository type

func NewFileRepository

func NewFileRepository(t interface {
	mock.TestingT
	Cleanup(func())
}) *FileRepository

NewFileRepository creates a new instance of FileRepository. 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 (*FileRepository) CheckAndStoreUniqueID

func (_m *FileRepository) CheckAndStoreUniqueID(ctx context.Context, id string, ttl time.Duration) error

CheckAndStoreUniqueID provides a mock function with given fields: ctx, id, ttl

func (*FileRepository) DeleteID

func (_m *FileRepository) DeleteID(ctx context.Context, id string) error

DeleteID provides a mock function with given fields: ctx, id

type FileUploadQueue

type FileUploadQueue struct {
	mock.Mock
}

FileUploadQueue is an autogenerated mock type for the FileUploadQueue type

func NewFileUploadQueue

func NewFileUploadQueue(t interface {
	mock.TestingT
	Cleanup(func())
}) *FileUploadQueue

NewFileUploadQueue creates a new instance of FileUploadQueue. 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 (*FileUploadQueue) Store

func (_m *FileUploadQueue) Store(file domain.File) error

Store provides a mock function with given fields: file

type QuotaResetService

type QuotaResetService struct {
	mock.Mock
}

QuotaResetService is an autogenerated mock type for the QuotaResetService type

func NewQuotaResetService

func NewQuotaResetService(t interface {
	mock.TestingT
	Cleanup(func())
}) *QuotaResetService

NewQuotaResetService creates a new instance of QuotaResetService. 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 (*QuotaResetService) ResetUserQuota

func (_m *QuotaResetService) ResetUserQuota(ctx context.Context) error

ResetUserQuota provides a mock function with given fields: ctx

type RateLimitService

type RateLimitService struct {
	mock.Mock
}

RateLimitService is an autogenerated mock type for the RateLimitService type

func NewRateLimitService

func NewRateLimitService(t interface {
	mock.TestingT
	Cleanup(func())
}) *RateLimitService

NewRateLimitService creates a new instance of RateLimitService. 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 (*RateLimitService) CheckRateLimit

func (_m *RateLimitService) CheckRateLimit(ctx context.Context, userID string) error

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

type RateLimiter

type RateLimiter struct {
	mock.Mock
}

RateLimiter is an autogenerated mock type for the RateLimiter type

func NewRateLimiter

func NewRateLimiter(t interface {
	mock.TestingT
	Cleanup(func())
}) *RateLimiter

NewRateLimiter creates a new instance of RateLimiter. 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 (*RateLimiter) GetUserLimit

func (_m *RateLimiter) GetUserLimit(ctx context.Context, userID string) (int, error)

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

func (*RateLimiter) IsAllowed

func (_m *RateLimiter) IsAllowed(ctx context.Context, userID string, limit int) (bool, error)

IsAllowed provides a mock function with given fields: ctx, userID, limit

func (*RateLimiter) SetUserLimit

func (_m *RateLimiter) SetUserLimit(ctx context.Context, userID string, limit int) error

SetUserLimit provides a mock function with given fields: ctx, userID, limit

type UploadService

type UploadService struct {
	mock.Mock
}

UploadService is an autogenerated mock type for the UploadService type

func NewUploadService

func NewUploadService(t interface {
	mock.TestingT
	Cleanup(func())
}) *UploadService

NewUploadService creates a new instance of UploadService. 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 (*UploadService) UploadFile

func (_m *UploadService) UploadFile(ctx context.Context, file domain.File) error

UploadFile provides a mock function with given fields: ctx, file

type UserRepository

type UserRepository struct {
	mock.Mock
}

UserRepository is an autogenerated mock type for the UserRepository type

func NewUserRepository

func NewUserRepository(t interface {
	mock.TestingT
	Cleanup(func())
}) *UserRepository

NewUserRepository creates a new instance of UserRepository. 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 (*UserRepository) DecrementUsage

func (_m *UserRepository) DecrementUsage(ctx context.Context, userID string, usage int64) error

DecrementUsage provides a mock function with given fields: ctx, userID, usage

func (*UserRepository) GetUserRateLimit

func (_m *UserRepository) GetUserRateLimit(ctx context.Context, userID string) (int, error)

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

func (*UserRepository) IncrementUsage

func (_m *UserRepository) IncrementUsage(ctx context.Context, userID string, usage int64) error

IncrementUsage provides a mock function with given fields: ctx, userID, usage

func (*UserRepository) ResetUsage

func (_m *UserRepository) ResetUsage(ctx context.Context, end time.Time) error

ResetUsage provides a mock function with given fields: ctx, end

Jump to

Keyboard shortcuts

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