user

package
v0.2.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: MIT Imports: 19 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 New

func New(ds store.IStore) *userBiz

New creates a new instance of userBiz with the provided data store.

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 any) *gomock.Call

Create indicates an expected call of Create.

func (*MockUserBizMockRecorder) Delete

func (mr *MockUserBizMockRecorder) Delete(arg0, arg1 any) *gomock.Call

Delete indicates an expected call of Delete.

func (*MockUserBizMockRecorder) Get

func (mr *MockUserBizMockRecorder) Get(arg0, arg1 any) *gomock.Call

Get indicates an expected call of Get.

func (*MockUserBizMockRecorder) List

func (mr *MockUserBizMockRecorder) List(arg0, arg1 any) *gomock.Call

List indicates an expected call of List.

func (*MockUserBizMockRecorder) Update

func (mr *MockUserBizMockRecorder) Update(arg0, arg1 any) *gomock.Call

Update indicates an expected call of Update.

func (*MockUserBizMockRecorder) UpdatePassword

func (mr *MockUserBizMockRecorder) UpdatePassword(arg0, arg1 any) *gomock.Call

UpdatePassword indicates an expected call of UpdatePassword.

type UserBiz

type UserBiz interface {
	// Create creates a new user based on the provided request.
	Create(ctx context.Context, rq *v1.CreateUserRequest) (*v1.UserReply, error)

	// Update updates an existing user based on the provided request.
	Update(ctx context.Context, rq *v1.UpdateUserRequest) error

	// Delete removes a user based on the provided request.
	Delete(ctx context.Context, rq *v1.DeleteUserRequest) error

	// Get retrieves a user by username based on the provided request.
	Get(ctx context.Context, rq *v1.GetUserRequest) (*v1.UserReply, error)

	// List retrieves a list of all users based on the provided request.
	List(ctx context.Context, rq *v1.ListUserRequest) (*v1.ListUserResponse, error)

	UserExpansion
}

UserBiz defines methods used to handle user requests.

type UserExpansion

type UserExpansion interface {
	// UpdatePassword updates the password for a user based on the provided request.
	UpdatePassword(ctx context.Context, rq *v1.UpdatePasswordRequest) error
}

UserExpansion defines additional methods for user operations.

Jump to

Keyboard shortcuts

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