biz

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2025 License: MIT Imports: 8 Imported by: 0

README

Biz 层

Biz 目录下包含了 v1v2 这类版本化的目录及每个资源独占一个目录,原因如下:

  1. 随着产品功能的迭代,业务逻辑可能会出现不兼容变更,也即可能会出现 v2 版本,所以 Biz 目录下包含了v1v2 这类版本化目录;
  2. Biz 层用来处理业务逻辑,代码量大,为了便于维护代码,在 Biz 层,将不同资源存放在单独的目录中,例如:v1/postv1/user

Documentation

Overview

Package biz is the place where you can implements more complex business logic.

Package biz is a generated GoMock package.

Index

Constants

This section is empty.

Variables

View Source
var ProviderSet = wire.NewSet(NewBiz, wire.Bind(new(IBiz), new(*biz)))

ProviderSet is a Wire provider set used to declare dependency injection rules. Includes the NewBiz constructor to create a biz instance. wire.Bind binds the IBiz interface to the concrete implementation *biz, so places that depend on IBiz will automatically inject a *biz instance.

Functions

func NewBiz

func NewBiz(store store.IStore, clientset clientset.Interface, informer informers.SharedInformerFactory) *biz

NewBiz creates an instance of IBiz.

Types

type IBiz

type IBiz interface {
	// MinerSetV1 returns the MinerSetBiz business interface.
	MinerSetV1() minersetv1.MinerSetBiz
	// MinerV1 returns the MinerBiz business interface.
	MinerV1() minerv1.MinerBiz
}

IBiz defines the methods that must be implemented by the business layer.

type MockIBiz

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

MockIBiz is a mock of IBiz interface.

func NewMockIBiz

func NewMockIBiz(ctrl *gomock.Controller) *MockIBiz

NewMockIBiz creates a new mock instance.

func (*MockIBiz) EXPECT

func (m *MockIBiz) EXPECT() *MockIBizMockRecorder

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

func (*MockIBiz) MinerSetV1

func (m *MockIBiz) MinerSetV1() minerset.MinerSetBiz

MinerSetV1 mocks base method.

func (*MockIBiz) MinerV1

func (m *MockIBiz) MinerV1() miner.MinerBiz

MinerV1 mocks base method.

type MockIBizMockRecorder

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

MockIBizMockRecorder is the mock recorder for MockIBiz.

func (*MockIBizMockRecorder) MinerSetV1

func (mr *MockIBizMockRecorder) MinerSetV1() *gomock.Call

MinerSetV1 indicates an expected call of MinerSetV1.

func (*MockIBizMockRecorder) MinerV1

func (mr *MockIBizMockRecorder) MinerV1() *gomock.Call

MinerV1 indicates an expected call of MinerV1.

Directories

Path Synopsis
v1
minerset
Package minerset is a generated GoMock package.
Package minerset is a generated GoMock package.

Jump to

Keyboard shortcuts

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