mocks

package
v0.0.0-...-3d9bb29 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2021 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateRSAKeyPair

func GenerateRSAKeyPair() (string, string)

func SetupGormMock

func SetupGormMock(t *testing.T) (*sql.DB, *gorm.DB, sqlmock.Sqlmock)

Types

type ArticleUseCase

type ArticleUseCase struct {
	mock.Mock
}

ArticleUseCase is an autogenerated mock type for the ArticleUseCase type

func (*ArticleUseCase) Create

Create provides a mock function with given fields: c, model

func (*ArticleUseCase) Delete

Delete provides a mock function with given fields: c, model

func (*ArticleUseCase) FindAll

FindAll provides a mock function with given fields: c, model

func (*ArticleUseCase) Get

Get provides a mock function with given fields: c, model

func (*ArticleUseCase) Save

Save provides a mock function with given fields: c, model

type IJwtAuth

type IJwtAuth struct {
	mock.Mock
}

IJwtAuth is an autogenerated mock type for the IJwtAuth type

func (*IJwtAuth) JwtAuthMiddleware

func (_m *IJwtAuth) JwtAuthMiddleware() gin.HandlerFunc

JwtAuthMiddleware provides a mock function with given fields:

func (*IJwtAuth) Sign

func (_m *IJwtAuth) Sign(userId string, username string) (string, error)

Sign provides a mock function with given fields: userId, username

type UserUseCase

type UserUseCase struct {
	mock.Mock
}

UserUseCase is an autogenerated mock type for the UserUseCase type

func (*UserUseCase) GetProfile

func (_m *UserUseCase) GetProfile(c context.Context, model users.GetProfileModel) utils.Response

GetProfile provides a mock function with given fields: c, model

func (*UserUseCase) Login

Login provides a mock function with given fields: c, model

func (*UserUseCase) Register

func (_m *UserUseCase) Register(c context.Context, model users.RegisterModel) utils.Response

Register provides a mock function with given fields: c, model

Jump to

Keyboard shortcuts

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