data

package
v0.0.0-...-71f3af2 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2024 License: MIT Imports: 10 Imported by: 0

README

Data

Documentation

Index

Constants

This section is empty.

Variables

Functions

func NewDB

func NewDB(c *conf.Data) *gorm.DB

NewDB 连接mysql数据库

Types

type Data

type Data struct {
	DB *gorm.DB
}

func NewData

func NewData(c *conf.Data, db *gorm.DB) (*Data, func(), error)

type UserRepo

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

func NewUserRepo

func NewUserRepo(data *Data) *UserRepo

func (*UserRepo) GetByUserID

func (r *UserRepo) GetByUserID(ctx context.Context, userID string) (*biz.User, error)

func (*UserRepo) Save

func (r *UserRepo) Save(ctx context.Context, user *biz.User) error

Jump to

Keyboard shortcuts

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