data

package
v0.0.0-...-c8c1909 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2022 License: Apache-2.0, MIT Imports: 10 Imported by: 0

README

Data

Documentation

Index

Constants

This section is empty.

Variables

ProviderSet is data providers.

Functions

func NewCartRepo

func NewCartRepo(data *Data, logger log.Logger) biz.CartRepo

NewCartRepo .

func NewMongo

func NewMongo(conf *conf.Data) *mongo.Database

NewMongo .

Types

type CartSchema

type CartSchema struct {
	UserId int64        `bson:"uid"`
	Items  []ItemSchema `bson:"items"`
}

CartSchema mongodb 数据库结构定义

type Data

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

Data .

func NewData

func NewData(database *mongo.Database, logger log.Logger) (*Data, func(), error)

NewData .

type ItemSchema

type ItemSchema struct {
	ItemId   int64 `bson:"itemId"`
	Quantity int64 `bson:"quantity"`
}

Jump to

Keyboard shortcuts

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