repository

package
v0.0.0-...-7329380 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppStoreRepository

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

func (*AppStoreRepository) AddInstallNumber

func (u *AppStoreRepository) AddInstallNumber(appID int64) error

添加安装数量统计

func (*AppStoreRepository) AddViewNumber

func (u *AppStoreRepository) AddViewNumber(appID int64) error

添加浏览统计

func (*AppStoreRepository) CreateAppStore

func (u *AppStoreRepository) CreateAppStore(appStore *model.AppStore) (int64, error)

创建AppStore信息

func (*AppStoreRepository) DeleteAppStoreByID

func (u *AppStoreRepository) DeleteAppStoreByID(appStoreID int64) error

根据ID删除AppStore信息

func (*AppStoreRepository) FindAll

func (u *AppStoreRepository) FindAll() (appStoreAll []model.AppStore, err error)

获取结果集

func (*AppStoreRepository) FindAppStoreByID

func (u *AppStoreRepository) FindAppStoreByID(appStoreID int64) (appStore *model.AppStore, err error)

根据ID查找AppStore信息

func (*AppStoreRepository) GetInstallNumber

func (u *AppStoreRepository) GetInstallNumber(appID int64) int64

获取安装数量统计

func (*AppStoreRepository) GetViewNumber

func (u *AppStoreRepository) GetViewNumber(appID int64) int64

获取浏览数量

func (*AppStoreRepository) InitTable

func (u *AppStoreRepository) InitTable() error

初始化表

func (*AppStoreRepository) UpdateAppStore

func (u *AppStoreRepository) UpdateAppStore(appStore *model.AppStore) error

更新AppStore信息

type IAppStoreRepository

type IAppStoreRepository interface {
	//初始化表
	InitTable() error
	//根据ID查处找数据
	FindAppStoreByID(int64) (*model.AppStore, error)
	//创建一条 appStore 数据
	CreateAppStore(*model.AppStore) (int64, error)
	//根据ID删除一条 appStore 数据
	DeleteAppStoreByID(int64) error
	//修改更新数据
	UpdateAppStore(*model.AppStore) error
	//查找appStore所有数据
	FindAll() ([]model.AppStore, error)

	//添加安装数量
	AddInstallNumber(int64) error
	//获取安装数量
	GetInstallNumber(int64) int64
	//添加浏览量
	AddViewNumber(int64) error
	//获取浏览量
	GetViewNumber(int64) int64
}

创建需要实现的接口

func NewAppStoreRepository

func NewAppStoreRepository(db *gorm.DB) IAppStoreRepository

创建appStoreRepository

Jump to

Keyboard shortcuts

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