data

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2023 License: MIT Imports: 17 Imported by: 0

README

Data

Documentation

Index

Constants

This section is empty.

Variables

ProviderSet is data providers.

Functions

func NewChatgptRepo

func NewChatgptRepo(data *Data, logger log.Logger) biz.ChatgptRepo

func NewDiscovery

func NewDiscovery(conf *conf.Registry) registry.Discovery

func NewMysqlCmd

func NewMysqlCmd(conf *conf.Bootstrap, logger log.Logger) *gorm.DB

func NewRedisClient

func NewRedisClient(conf *conf.Data) *redis.Client

func NewRedisCmd

func NewRedisCmd(conf *conf.Data, logger log.Logger) redis.Cmdable

func NewRegistrar

func NewRegistrar(conf *conf.Registry) registry.Registrar

func Paginate

func Paginate(page, pageSize int64) func(db *gorm.DB) *gorm.DB

Paginate 分页

Types

type BaseFields

type BaseFields struct {
	Id        int64          `gorm:"primarykey;type:int;comment:主键id"`
	CreatedAt time.Time      `gorm:"column:created_at;not null;comment:创建时间"`
	UpdatedAt time.Time      `gorm:"column:updated_at;not null;comment:更新时间"`
	DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;comment:删除时间"`
}

type ChatgptRepo

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

func (ChatgptRepo) CreateGptMessage

type Data

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

Data .

func NewData

func NewData(cfg *conf.Bootstrap, db *gorm.DB, redisCli *redis.Client, logger log.Logger) (*Data, func(), error)

Jump to

Keyboard shortcuts

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