dao

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2021 License: MIT Imports: 14 Imported by: 0

README

dao

数据访问层,负责访问 DB、MC、外部 HTTP 等接口,对上层屏蔽数据访问细节。

具体职责有:

  • SQL 拼接和 DB 访问逻辑
  • DB 的拆库折表逻辑
  • DB 的缓存读写逻辑
  • HTTP 接口调用逻辑

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SyncXORMTables

func SyncXORMTables()

Types

type LinkDao

type LinkDao struct {
	schema.Link
}

func NewLinkDao

func NewLinkDao() *LinkDao

func (*LinkDao) CreateMongoDBIndex added in v1.0.1

func (dao *LinkDao) CreateMongoDBIndex(ctx context.Context) (name []string, err error)

func (*LinkDao) FindOneLinkByCode

func (dao *LinkDao) FindOneLinkByCode(ctx context.Context) (err error)

func (*LinkDao) FindOneLinkByCodeFromMongoDB

func (dao *LinkDao) FindOneLinkByCodeFromMongoDB(ctx context.Context) (err error)

func (*LinkDao) FindOneLinkByHash

func (dao *LinkDao) FindOneLinkByHash(ctx context.Context) (err error)

func (*LinkDao) FindOneLinkByHashFromMongoDB

func (dao *LinkDao) FindOneLinkByHashFromMongoDB(ctx context.Context) (err error)
func (dao *LinkDao) SaveOneLink(ctx context.Context) (err error)

func (*LinkDao) SaveOneLinkToMongoDB

func (dao *LinkDao) SaveOneLinkToMongoDB(ctx context.Context) (err error)

Jump to

Keyboard shortcuts

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