biz

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 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(cache cache.Cache[*any.Any], store store.IStore) *biz

NewBiz creates an instance of IBiz.

Types

type IBiz

type IBiz interface {
	// NamespacedV1 returns the NamespacedBiz business interface.
	NamespacedV1(namespace string) namespacedv1.NamespacedBiz
	// SecretV1 returns the SecretBiz business interface.
	SecretV1() secretv1.SecretBiz
}

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) NamespacedV1

func (m *MockIBiz) NamespacedV1(arg0 string) namespaced.NamespacedBiz

NamespacedV1 mocks base method.

func (*MockIBiz) SecretV1

func (m *MockIBiz) SecretV1() secret.SecretBiz

SecretV1 mocks base method.

type MockIBizMockRecorder

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

MockIBizMockRecorder is the mock recorder for MockIBiz.

func (*MockIBizMockRecorder) NamespacedV1

func (mr *MockIBizMockRecorder) NamespacedV1(arg0 interface{}) *gomock.Call

NamespacedV1 indicates an expected call of NamespacedV1.

func (*MockIBizMockRecorder) SecretV1

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

SecretV1 indicates an expected call of SecretV1.

Directories

Path Synopsis
v1

Jump to

Keyboard shortcuts

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