user

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package user is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ModelToReply

func ModelToReply(userM *model.UserM) *v1.UserReply

ModelToReply converts a model.UserM to a v1.UserReply. It copies the data from userM to user and sets the CreatedAt and UpdatedAt fields to their respective timestamps.

func New

func New(ds store.IStore) *userBiz

New returns a new instance of userBiz.

Types

type MockUserBiz

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

MockUserBiz is a mock of UserBiz interface.

func NewMockUserBiz

func NewMockUserBiz(ctrl *gomock.Controller) *MockUserBiz

NewMockUserBiz creates a new mock instance.

func (*MockUserBiz) Create

func (m *MockUserBiz) Create(arg0 context.Context, arg1 *v1.CreateUserRequest) (*v1.UserReply, error)

Create mocks base method.

func (*MockUserBiz) Delete

func (m *MockUserBiz) Delete(arg0 context.Context, arg1 *v1.DeleteUserRequest) error

Delete mocks base method.

func (*MockUserBiz) EXPECT

func (m *MockUserBiz) EXPECT() *MockUserBizMockRecorder

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

func (*MockUserBiz) Get

func (m *MockUserBiz) Get(arg0 context.Context, arg1 *v1.GetUserRequest) (*v1.UserReply, error)

Get mocks base method.

func (*MockUserBiz) List

List mocks base method.

func (*MockUserBiz) Update

func (m *MockUserBiz) Update(arg0 context.Context, arg1 *v1.UpdateUserRequest) error

Update mocks base method.

func (*MockUserBiz) UpdatePassword

func (m *MockUserBiz) UpdatePassword(arg0 context.Context, arg1 *v1.UpdatePasswordRequest) error

UpdatePassword mocks base method.

type MockUserBizMockRecorder

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

MockUserBizMockRecorder is the mock recorder for MockUserBiz.

func (*MockUserBizMockRecorder) Create

func (mr *MockUserBizMockRecorder) Create(arg0, arg1 interface{}) *gomock.Call

Create indicates an expected call of Create.

func (*MockUserBizMockRecorder) Delete

func (mr *MockUserBizMockRecorder) Delete(arg0, arg1 interface{}) *gomock.Call

Delete indicates an expected call of Delete.

func (*MockUserBizMockRecorder) Get

func (mr *MockUserBizMockRecorder) Get(arg0, arg1 interface{}) *gomock.Call

Get indicates an expected call of Get.

func (*MockUserBizMockRecorder) List

func (mr *MockUserBizMockRecorder) List(arg0, arg1 interface{}) *gomock.Call

List indicates an expected call of List.

func (*MockUserBizMockRecorder) Update

func (mr *MockUserBizMockRecorder) Update(arg0, arg1 interface{}) *gomock.Call

Update indicates an expected call of Update.

func (*MockUserBizMockRecorder) UpdatePassword

func (mr *MockUserBizMockRecorder) UpdatePassword(arg0, arg1 interface{}) *gomock.Call

UpdatePassword indicates an expected call of UpdatePassword.

type UserBiz

type UserBiz interface {
	Create(ctx context.Context, rq *v1.CreateUserRequest) (*v1.UserReply, error)
	List(ctx context.Context, rq *v1.ListUserRequest) (*v1.ListUserResponse, error)
	Get(ctx context.Context, rq *v1.GetUserRequest) (*v1.UserReply, error)
	Update(ctx context.Context, rq *v1.UpdateUserRequest) error
	Delete(ctx context.Context, rq *v1.DeleteUserRequest) error

	// extensions apis
	UpdatePassword(ctx context.Context, rq *v1.UpdatePasswordRequest) error
}

UserBiz defines methods used to handle user rquest.

Jump to

Keyboard shortcuts

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