auth

package
v0.0.0-...-46fca04 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2022 License: MIT, MIT Imports: 14 Imported by: 0

Documentation

Overview

Package auth is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dependencies

type Dependencies struct {
	AuthRepo IAuthRepo
	UserRepo IUserRepo
}

type IAuthRepo

type IAuthRepo interface {
	GoogleRedirectURL(ctx context.Context, state string) string
	GetGoogleUserInfo(ctx context.Context, code string) (google.GoogleUserInfo, error)
}

type IUserRepo

type IUserRepo interface {
	Get(ctx context.Context, param db.GetDBParam) ([]user.User, int, error)
	Create(ctx context.Context, usr user.User) (user.User, error)
}

type MockIAuthRepo

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

MockIAuthRepo is a mock of IAuthRepo interface.

func NewMockIAuthRepo

func NewMockIAuthRepo(ctrl *gomock.Controller) *MockIAuthRepo

NewMockIAuthRepo creates a new mock instance.

func (*MockIAuthRepo) EXPECT

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

func (*MockIAuthRepo) GetGoogleUserInfo

func (m *MockIAuthRepo) GetGoogleUserInfo(ctx context.Context, code string) (google.GoogleUserInfo, error)

GetGoogleUserInfo mocks base method.

func (*MockIAuthRepo) GoogleRedirectURL

func (m *MockIAuthRepo) GoogleRedirectURL(ctx context.Context, state string) string

GoogleRedirectURL mocks base method.

type MockIAuthRepoMockRecorder

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

MockIAuthRepoMockRecorder is the mock recorder for MockIAuthRepo.

func (*MockIAuthRepoMockRecorder) GetGoogleUserInfo

func (mr *MockIAuthRepoMockRecorder) GetGoogleUserInfo(ctx, code interface{}) *gomock.Call

GetGoogleUserInfo indicates an expected call of GetGoogleUserInfo.

func (*MockIAuthRepoMockRecorder) GoogleRedirectURL

func (mr *MockIAuthRepoMockRecorder) GoogleRedirectURL(ctx, state interface{}) *gomock.Call

GoogleRedirectURL indicates an expected call of GoogleRedirectURL.

type MockIUserRepo

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

MockIUserRepo is a mock of IUserRepo interface.

func NewMockIUserRepo

func NewMockIUserRepo(ctrl *gomock.Controller) *MockIUserRepo

NewMockIUserRepo creates a new mock instance.

func (*MockIUserRepo) Create

func (m *MockIUserRepo) Create(ctx context.Context, usr user.User) (user.User, error)

Create mocks base method.

func (*MockIUserRepo) EXPECT

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

func (*MockIUserRepo) Get

func (m *MockIUserRepo) Get(ctx context.Context, param db.GetDBParam) ([]user.User, int, error)

Get mocks base method.

type MockIUserRepoMockRecorder

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

MockIUserRepoMockRecorder is the mock recorder for MockIUserRepo.

func (*MockIUserRepoMockRecorder) Create

func (mr *MockIUserRepoMockRecorder) Create(ctx, usr interface{}) *gomock.Call

Create indicates an expected call of Create.

func (*MockIUserRepoMockRecorder) Get

func (mr *MockIUserRepoMockRecorder) Get(ctx, param interface{}) *gomock.Call

Get indicates an expected call of Get.

type UseCase

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

func New

func New(dep Dependencies) *UseCase

func (*UseCase) GenerateTag

func (u *UseCase) GenerateTag(ctx context.Context) string

func (*UseCase) GetByEmail

func (u *UseCase) GetByEmail(ctx context.Context, email string) (user.User, error)

func (*UseCase) GetGoogleProfileInfo

func (u *UseCase) GetGoogleProfileInfo(ctx context.Context, code string) (google.GoogleUserInfo, error)

func (*UseCase) GoogleRedirectURL

func (u *UseCase) GoogleRedirectURL(ctx context.Context, state string) string

func (*UseCase) ParseJWTAccessToken

func (u *UseCase) ParseJWTAccessToken(c context.Context, accessToken string) (user.User, error)

func (*UseCase) ParseJWTRefreshToken

func (u *UseCase) ParseJWTRefreshToken(c context.Context, refreshToken string) (user.User, error)

func (*UseCase) SignJWT

func (u *UseCase) SignJWT(c context.Context, usr user.User) (string, string, error)

func (*UseCase) Signup

func (u *UseCase) Signup(ctx context.Context, tag, name, email string) (user.User, error)

Jump to

Keyboard shortcuts

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