repo

package
v0.0.0-...-7208f07 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ProviderSet = wire.NewSet(NewImpl)

ProviderSet is a provider set for wire

Functions

This section is empty.

Types

type IAuthRepo

type IAuthRepo interface {
	GetUserByOpenID(ctx contextx.Contextx, provider, id string) (info *user.Profile, err error)

	GetUserByID(ctx contextx.Contextx, id uint64) (info *user.Profile, err error)

	RegisterUser(ctx contextx.Contextx, newUser *user.Profile) (info *user.Profile, err error)

	UpdateUser(ctx contextx.Contextx, newUser *user.Profile) (info *user.Profile, err error)
}

IAuthRepo declare auth repository functions

func CreateIRepo

func CreateIRepo(rw *sqlx.DB) (IAuthRepo, error)

func NewImpl

func NewImpl(rw *sqlx.DB) IAuthRepo

NewImpl return IAuthRepo

type MockIAuthRepo

type MockIAuthRepo struct {
	mock.Mock
}

MockIAuthRepo is an autogenerated mock type for the IAuthRepo type

func NewMockIAuthRepo

func NewMockIAuthRepo(t mockConstructorTestingTNewMockIAuthRepo) *MockIAuthRepo

NewMockIAuthRepo creates a new instance of MockIAuthRepo. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MockIAuthRepo) GetUserByID

func (_m *MockIAuthRepo) GetUserByID(ctx contextx.Contextx, id uint64) (*user.Profile, error)

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

func (*MockIAuthRepo) GetUserByOpenID

func (_m *MockIAuthRepo) GetUserByOpenID(ctx contextx.Contextx, provider string, id string) (*user.Profile, error)

GetUserByOpenID provides a mock function with given fields: ctx, provider, id

func (*MockIAuthRepo) RegisterUser

func (_m *MockIAuthRepo) RegisterUser(ctx contextx.Contextx, newUser *user.Profile) (*user.Profile, error)

RegisterUser provides a mock function with given fields: ctx, newUser

func (*MockIAuthRepo) UpdateUser

func (_m *MockIAuthRepo) UpdateUser(ctx contextx.Contextx, newUser *user.Profile) (*user.Profile, error)

UpdateUser provides a mock function with given fields: ctx, newUser

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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