Documentation
¶
Index ¶
- Variables
- func Aggregate(ctx context.Context, database, collection string, pipeline []bson.M, ...) error
- func AggregateByPage(ctx context.Context, database, collection, countField string, ...) error
- type AccountDao
- type AppDao
- type AudioDao
- type ChatDao
- type CorpDao
- type DealRecordDao
- type FindOptions
- type GroupDao
- type IMongoDB
- type ImageDao
- type KeyDao
- type MidjourneyDao
- type ModelAgentDao
- type ModelDao
- type MongoDB
- func (m *MongoDB[T]) Aggregate(ctx context.Context, pipeline []bson.M, result interface{}) error
- func (m *MongoDB[T]) AggregateByPage(ctx context.Context, countField string, paging *db.Paging, ...) error
- func (m *MongoDB[T]) CountDocuments(ctx context.Context, filter map[string]interface{}) (int64, error)
- func (m *MongoDB[T]) DeleteById(ctx context.Context, id interface{}) (int64, error)
- func (m *MongoDB[T]) DeleteMany(ctx context.Context, filter map[string]interface{}) (int64, error)
- func (m *MongoDB[T]) DeleteOne(ctx context.Context, filter map[string]interface{}) (int64, error)
- func (m *MongoDB[T]) EstimatedDocumentCount(ctx context.Context) (int64, error)
- func (m *MongoDB[T]) Find(ctx context.Context, filter map[string]interface{}, ...) ([]*T, error)
- func (m *MongoDB[T]) FindById(ctx context.Context, id interface{}, findOptions ...*FindOptions) (*T, error)
- func (m *MongoDB[T]) FindByIds(ctx context.Context, ids interface{}, findOptions ...*FindOptions) ([]*T, error)
- func (m *MongoDB[T]) FindByPage(ctx context.Context, paging *db.Paging, filter map[string]interface{}, ...) ([]*T, error)
- func (m *MongoDB[T]) FindOne(ctx context.Context, filter map[string]interface{}, ...) (*T, error)
- func (m *MongoDB[T]) FindOneAndDelete(ctx context.Context, filter map[string]interface{}) (*T, error)
- func (m *MongoDB[T]) FindOneAndDeleteById(ctx context.Context, id interface{}) (*T, error)
- func (m *MongoDB[T]) FindOneAndUpdate(ctx context.Context, filter map[string]interface{}, update interface{}, ...) (*T, error)
- func (m *MongoDB[T]) FindOneAndUpdateById(ctx context.Context, id interface{}, update interface{}, isUpsert ...bool) (*T, error)
- func (m *MongoDB[T]) Insert(ctx context.Context, document interface{}) (string, error)
- func (m *MongoDB[T]) Inserts(ctx context.Context, documents []interface{}) ([]string, error)
- func (m *MongoDB[T]) UpdateById(ctx context.Context, id, update interface{}, isUpsert ...bool) error
- func (m *MongoDB[T]) UpdateMany(ctx context.Context, filter map[string]interface{}, update interface{}, ...) error
- func (m *MongoDB[T]) UpdateOne(ctx context.Context, filter map[string]interface{}, update interface{}, ...) error
- type ResellerAccountDao
- type ResellerDao
- func (d *ResellerDao) ChangeAccountById(ctx context.Context, id, account string) error
- func (d *ResellerDao) ChangePasswordByUserId(ctx context.Context, userId int, password string) error
- func (d *ResellerDao) CreateAccount(ctx context.Context, account *do.ResellerAccount) (string, error)
- func (d *ResellerDao) FindAccount(ctx context.Context, account string) (*entity.ResellerAccount, error)
- func (d *ResellerDao) FindAccountByUserId(ctx context.Context, userId int) (*entity.ResellerAccount, error)
- func (d *ResellerDao) FindAccountsByUserId(ctx context.Context, userId int) ([]*entity.ResellerAccount, error)
- func (d *ResellerDao) FindResellerByAccount(ctx context.Context, account string) (*entity.Reseller, error)
- func (d *ResellerDao) FindResellerByUserId(ctx context.Context, userId int) (*entity.Reseller, error)
- func (d *ResellerDao) FindResellerListByUserIds(ctx context.Context, userIds []int) ([]*entity.Reseller, error)
- func (d *ResellerDao) IsAccountExist(ctx context.Context, account string) bool
- func (d *ResellerDao) IsEmailExist(ctx context.Context, email string) bool
- func (d *ResellerDao) IsPhoneExist(ctx context.Context, phone string) bool
- type SiteConfigDao
- type StatisticsAppDao
- type StatisticsAppKeyDao
- type StatisticsUserDao
- type SysAdminDao
- type SysConfigDao
- type UserDao
- func (d *UserDao) ChangeAccountById(ctx context.Context, id, account string) error
- func (d *UserDao) ChangePasswordByUserId(ctx context.Context, userId int, password string) error
- func (d *UserDao) CreateAccount(ctx context.Context, account *do.Account) (string, error)
- func (d *UserDao) FindAccount(ctx context.Context, account string) (*entity.Account, error)
- func (d *UserDao) FindAccountByUserId(ctx context.Context, userId int) (*entity.Account, error)
- func (d *UserDao) FindAccountsByUserId(ctx context.Context, userId int) ([]*entity.Account, error)
- func (d *UserDao) FindUserByAccount(ctx context.Context, account string) (*entity.User, error)
- func (d *UserDao) FindUserByUserId(ctx context.Context, userId int) (*entity.User, error)
- func (d *UserDao) FindUserListByUserIds(ctx context.Context, userIds []int) ([]*entity.User, error)
- func (d *UserDao) IsAccountExist(ctx context.Context, account string) bool
- func (d *UserDao) IsEmailExist(ctx context.Context, email string) bool
- func (d *UserDao) IsPhoneExist(ctx context.Context, phone string) bool
Constants ¶
This section is empty.
Variables ¶
View Source
var Account = NewAccountDao()
View Source
var App = NewAppDao()
View Source
var Audio = NewAudioDao()
View Source
var Chat = NewChatDao()
View Source
var Corp = NewCorpDao()
View Source
var DealRecord = NewDealRecordDao()
View Source
var Group = NewGroupDao()
View Source
var Image = NewImageDao()
View Source
var Key = NewKeyDao()
View Source
var Midjourney = NewMidjourneyDao()
View Source
var Model = NewModelDao()
View Source
var ModelAgent = NewModelAgentDao()
View Source
var Reseller = NewResellerDao()
View Source
var ResellerAccount = NewResellerAccountDao()
View Source
var SiteConfig = NewSiteConfigDao()
View Source
var StatisticsApp = NewStatisticsAppDao()
View Source
var StatisticsAppKey = NewStatisticsAppKeyDao()
View Source
var StatisticsUser = NewStatisticsUserDao()
View Source
var SysAdmin = NewSysAdminDao()
View Source
var SysConfig = NewSysConfigDao()
View Source
var User = NewUserDao()
Functions ¶
Types ¶
type AccountDao ¶
func NewAccountDao ¶
func NewAccountDao(database ...string) *AccountDao
type AudioDao ¶ added in v0.5.0
func NewAudioDao ¶ added in v0.5.0
type ChatDao ¶
func NewChatDao ¶
type CorpDao ¶ added in v0.3.0
func NewCorpDao ¶ added in v0.3.0
type DealRecordDao ¶ added in v0.4.0
type DealRecordDao struct {
*MongoDB[entity.DealRecord]
}
func NewDealRecordDao ¶ added in v0.4.0
func NewDealRecordDao(database ...string) *DealRecordDao
type FindOptions ¶ added in v1.5.0
type GroupDao ¶ added in v1.5.0
func NewGroupDao ¶ added in v1.5.0
type ImageDao ¶ added in v0.4.0
func NewImageDao ¶ added in v0.4.0
type MidjourneyDao ¶ added in v0.4.0
type MidjourneyDao struct {
*MongoDB[entity.Midjourney]
}
func NewMidjourneyDao ¶ added in v0.4.0
func NewMidjourneyDao(database ...string) *MidjourneyDao
type ModelAgentDao ¶
type ModelAgentDao struct {
*MongoDB[entity.ModelAgent]
}
func NewModelAgentDao ¶
func NewModelAgentDao(database ...string) *ModelAgentDao
type ModelDao ¶
func NewModelDao ¶
type MongoDB ¶
func NewMongoDB ¶
func (*MongoDB[T]) AggregateByPage ¶
func (*MongoDB[T]) CountDocuments ¶
func (*MongoDB[T]) DeleteById ¶
func (*MongoDB[T]) DeleteMany ¶
func (*MongoDB[T]) EstimatedDocumentCount ¶
func (*MongoDB[T]) FindById ¶
func (m *MongoDB[T]) FindById(ctx context.Context, id interface{}, findOptions ...*FindOptions) (*T, error)
func (*MongoDB[T]) FindByIds ¶
func (m *MongoDB[T]) FindByIds(ctx context.Context, ids interface{}, findOptions ...*FindOptions) ([]*T, error)
func (*MongoDB[T]) FindByPage ¶
func (*MongoDB[T]) FindOneAndDelete ¶
func (*MongoDB[T]) FindOneAndDeleteById ¶
func (*MongoDB[T]) FindOneAndUpdate ¶
func (*MongoDB[T]) FindOneAndUpdateById ¶
func (*MongoDB[T]) UpdateById ¶
func (*MongoDB[T]) UpdateMany ¶
type ResellerAccountDao ¶ added in v1.5.0
type ResellerAccountDao struct {
*MongoDB[entity.ResellerAccount]
}
func NewResellerAccountDao ¶ added in v1.5.0
func NewResellerAccountDao(database ...string) *ResellerAccountDao
type ResellerDao ¶ added in v1.5.0
func NewResellerDao ¶ added in v1.5.0
func NewResellerDao(database ...string) *ResellerDao
func (*ResellerDao) ChangeAccountById ¶ added in v1.5.0
func (d *ResellerDao) ChangeAccountById(ctx context.Context, id, account string) error
func (*ResellerDao) ChangePasswordByUserId ¶ added in v1.5.0
func (*ResellerDao) CreateAccount ¶ added in v1.5.0
func (d *ResellerDao) CreateAccount(ctx context.Context, account *do.ResellerAccount) (string, error)
func (*ResellerDao) FindAccount ¶ added in v1.5.0
func (d *ResellerDao) FindAccount(ctx context.Context, account string) (*entity.ResellerAccount, error)
func (*ResellerDao) FindAccountByUserId ¶ added in v1.5.0
func (d *ResellerDao) FindAccountByUserId(ctx context.Context, userId int) (*entity.ResellerAccount, error)
func (*ResellerDao) FindAccountsByUserId ¶ added in v1.5.0
func (d *ResellerDao) FindAccountsByUserId(ctx context.Context, userId int) ([]*entity.ResellerAccount, error)
func (*ResellerDao) FindResellerByAccount ¶ added in v1.5.0
func (d *ResellerDao) FindResellerByAccount(ctx context.Context, account string) (*entity.Reseller, error)
根据账号查询代理商
func (*ResellerDao) FindResellerByUserId ¶ added in v1.5.0
func (d *ResellerDao) FindResellerByUserId(ctx context.Context, userId int) (*entity.Reseller, error)
根据userId查询代理商
func (*ResellerDao) FindResellerListByUserIds ¶ added in v1.5.0
func (d *ResellerDao) FindResellerListByUserIds(ctx context.Context, userIds []int) ([]*entity.Reseller, error)
根据userIds查询代理商列表
func (*ResellerDao) IsAccountExist ¶ added in v1.5.0
func (d *ResellerDao) IsAccountExist(ctx context.Context, account string) bool
判断账号是否存在
func (*ResellerDao) IsEmailExist ¶ added in v1.5.0
func (d *ResellerDao) IsEmailExist(ctx context.Context, email string) bool
判断邮箱是否存在
func (*ResellerDao) IsPhoneExist ¶ added in v1.5.0
func (d *ResellerDao) IsPhoneExist(ctx context.Context, phone string) bool
判断手机号是否存在
type SiteConfigDao ¶ added in v1.0.0
type SiteConfigDao struct {
*MongoDB[entity.SiteConfig]
}
func NewSiteConfigDao ¶ added in v1.0.0
func NewSiteConfigDao(database ...string) *SiteConfigDao
type StatisticsAppDao ¶ added in v0.5.0
type StatisticsAppDao struct {
*MongoDB[entity.StatisticsApp]
}
func NewStatisticsAppDao ¶ added in v0.5.0
func NewStatisticsAppDao(database ...string) *StatisticsAppDao
type StatisticsAppKeyDao ¶ added in v0.5.0
type StatisticsAppKeyDao struct {
*MongoDB[entity.StatisticsAppKey]
}
func NewStatisticsAppKeyDao ¶ added in v0.5.0
func NewStatisticsAppKeyDao(database ...string) *StatisticsAppKeyDao
type StatisticsUserDao ¶ added in v0.5.0
type StatisticsUserDao struct {
*MongoDB[entity.StatisticsUser]
}
func NewStatisticsUserDao ¶ added in v0.5.0
func NewStatisticsUserDao(database ...string) *StatisticsUserDao
type SysAdminDao ¶
func NewSysAdminDao ¶
func NewSysAdminDao(database ...string) *SysAdminDao
func (*SysAdminDao) ChangePassword ¶
type SysConfigDao ¶ added in v1.3.0
func NewSysConfigDao ¶ added in v1.3.0
func NewSysConfigDao(database ...string) *SysConfigDao
type UserDao ¶
func NewUserDao ¶
func (*UserDao) ChangeAccountById ¶
func (*UserDao) ChangePasswordByUserId ¶
func (*UserDao) CreateAccount ¶
func (*UserDao) FindAccount ¶
func (*UserDao) FindAccountByUserId ¶
func (*UserDao) FindAccountsByUserId ¶
func (*UserDao) FindUserByAccount ¶
根据账号查询用户
func (*UserDao) FindUserByUserId ¶
根据userId查询用户
func (*UserDao) FindUserListByUserIds ¶
根据userIds查询用户列表
func (*UserDao) IsAccountExist ¶
判断账号是否存在
func (*UserDao) IsEmailExist ¶
判断邮箱是否存在
Click to show internal directories.
Click to hide internal directories.