data

package
v0.0.0-...-f432fae Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package data 实现了应用程序的数据访问层,提供数据存储、检索和管理的功能。

Index

Constants

This section is empty.

Variables

View Source
var (
	// ProviderSet 是数据层依赖注入的提供者集合。
	ProviderSet = wire.NewSet(
		NewData,
		NewGreeterRepo,
	)
)

Functions

func NewGreeterRepo

func NewGreeterRepo(logger kit_log.Logger, conf *app_conf.Config, data Data) app_biz.GreeterRepo

NewGreeterRepo 创建一个新的 GreeterRepo 实例。

参数:

  • logger:日志记录器,用于记录操作日志。
  • conf:应用配置信息。
  • data:数据层公共依赖。

返回:

  • GreeterRepo 接口实现。

Types

type Data

type Data interface{}

Data 定义了数据层的接口。 该接口提供了数据层的公共依赖和基础操作能力。

func NewData

func NewData(logger kit_log.Logger, conf *app_conf.Config) (Data, func(), error)

NewData 创建一个新的 Data 实例。

参数:

  • logger:日志记录器,用于记录操作日志。
  • conf:应用配置信息。

返回:

  • Data:数据层接口实现。
  • func():清理函数,用于资源释放。
  • error:可能的错误信息。

Jump to

Keyboard shortcuts

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