Documentation ¶
Index ¶
- type DbMongoSvc
- func (this *DbMongoSvc) AddAppData(ctx context.Context, data dbmodel.IDbModelMongo) (error, string)
- func (this *DbMongoSvc) CheckAppDataIndexs(ctx context.Context, data dbmodel.IDbModelMongo) error
- func (this *DbMongoSvc) CreateAccount(ctx context.Context, username string, password string, clientIp string) error
- func (this *DbMongoSvc) DeleteAppData(ctx context.Context, data dbmodel.IDbModelMongo, ...) error
- func (this *DbMongoSvc) DeleteAppDataById(ctx context.Context, data dbmodel.IDbModelMongo) error
- func (this *DbMongoSvc) GetAccountByUserName(ctx context.Context, username string) dbmodel.AppDataUser
- func (this *DbMongoSvc) GetAccountCount(ctx context.Context) int64
- func (this *DbMongoSvc) GetAppDataById(ctx context.Context, data dbmodel.IDbModelMongo) error
- func (this *DbMongoSvc) GetAppDataCount(ctx context.Context, data dbmodel.IDbModelMongo, ...) int64
- func (this *DbMongoSvc) GetAppDataListWithWhereAndOrder(ctx context.Context, data dbmodel.IDbModelMongo, ...) (error, []dbmodel.IDbModelMongo)
- func (this *DbMongoSvc) GetAppDataWithWhereAndOrder(ctx context.Context, data dbmodel.IDbModelMongo, ...) error
- func (this *DbMongoSvc) GetDataPageList(ctx context.Context, data dbmodel.IDbModelMongo, ...) dbmodel.PageData
- func (this *DbMongoSvc) GetDbHandle(ctx context.Context, dbName string) (error, *mongo.Database)
- func (this *DbMongoSvc) GetFirstIngressActionBackendNodeByBackendId(ctx context.Context, backendId string) dbmodel.AppDataIngressActionBackendNode
- func (this *DbMongoSvc) GetFirstIngressModelByNamespaceId(ctx context.Context, namespaceId string, data dbmodel.IDbModelMongo)
- func (this *DbMongoSvc) GetFirstIngressSiteByActionValue(ctx context.Context, actionValue string) dbmodel.AppDataIngressSite
- func (this *DbMongoSvc) GetFirstIngressSiteRuleByActionValue(ctx context.Context, actionValue string) dbmodel.AppDataIngressSiteRule
- func (this *DbMongoSvc) GetFirstIngressSiteRuleBySiteId(ctx context.Context, siteId string) dbmodel.AppDataIngressSiteRule
- func (this *DbMongoSvc) GetIngressActionBackendByTitle(ctx context.Context, title string) dbmodel.AppDataIngressActionBackend
- func (this *DbMongoSvc) GetIngressActionBackendNodeByTitle(ctx context.Context, title string) dbmodel.AppDataIngressActionBackendNode
- func (this *DbMongoSvc) GetIngressActionStaticByTitle(ctx context.Context, title string) dbmodel.AppDataIngressActionStatic
- func (this *DbMongoSvc) GetIngressConfigByNamespaceAndVersion(ctx context.Context, namespaceId string, version string) dbmodel.AppDataIngressConfig
- func (this *DbMongoSvc) GetIngressNamespaceByTitle(ctx context.Context, title string) dbmodel.AppDataIngressNamespace
- func (this *DbMongoSvc) GetIngressSiteByTitle(ctx context.Context, title string) dbmodel.AppDataIngressSite
- func (this *DbMongoSvc) GetIngressSiteRuleByTitle(ctx context.Context, title string) dbmodel.AppDataIngressSiteRule
- func (this *DbMongoSvc) GetIngressWorkerByToken(ctx context.Context, nodeToken string) dbmodel.AppDataIngressWorker
- func (this *DbMongoSvc) GetTableHandle(ctx context.Context, dbName string, tableName string) (error, *mongo.Collection)
- func (this *DbMongoSvc) PublishNamespaceConfig(ctx context.Context, namespaceId string) error
- func (this *DbMongoSvc) RemoveIngressConfigByNamespaceId(ctx context.Context, namespaceId string)
- func (this *DbMongoSvc) RemoveIngressWorkerByNamespaceId(ctx context.Context, namespaceId string)
- func (this *DbMongoSvc) UpdateAppData(ctx context.Context, data dbmodel.IDbModelMongo, ...) error
- func (this *DbMongoSvc) UpdateAppDataById(ctx context.Context, data dbmodel.IDbModelMongo) error
- func (this *DbMongoSvc) UpdateIngressActionBackendNodeCount(ctx context.Context, backendId string)
- func (this *DbMongoSvc) UpdateNamespaceLastVer(ctx context.Context, namespaceId string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DbMongoSvc ¶
type DbMongoSvc struct {
// contains filtered or unexported fields
}
func NewDbMongoSvc ¶
func NewDbMongoSvc(dbUri string) (error, *DbMongoSvc)
func (*DbMongoSvc) AddAppData ¶
func (this *DbMongoSvc) AddAppData(ctx context.Context, data dbmodel.IDbModelMongo) (error, string)
添加数据
func (*DbMongoSvc) CheckAppDataIndexs ¶
func (this *DbMongoSvc) CheckAppDataIndexs(ctx context.Context, data dbmodel.IDbModelMongo) error
确保数据索引是创建的
func (*DbMongoSvc) CreateAccount ¶
func (*DbMongoSvc) DeleteAppData ¶
func (this *DbMongoSvc) DeleteAppData(ctx context.Context, data dbmodel.IDbModelMongo, whereMap map[string]interface{}) error
func (*DbMongoSvc) DeleteAppDataById ¶
func (this *DbMongoSvc) DeleteAppDataById(ctx context.Context, data dbmodel.IDbModelMongo) error
func (*DbMongoSvc) GetAccountByUserName ¶
func (this *DbMongoSvc) GetAccountByUserName(ctx context.Context, username string) dbmodel.AppDataUser
func (*DbMongoSvc) GetAccountCount ¶
func (this *DbMongoSvc) GetAccountCount(ctx context.Context) int64
func (*DbMongoSvc) GetAppDataById ¶
func (this *DbMongoSvc) GetAppDataById(ctx context.Context, data dbmodel.IDbModelMongo) error
根据ID查找数据
func (*DbMongoSvc) GetAppDataCount ¶
func (this *DbMongoSvc) GetAppDataCount(ctx context.Context, data dbmodel.IDbModelMongo, whereMap map[string]interface{}) int64
查询对应条件的数量
func (*DbMongoSvc) GetAppDataListWithWhereAndOrder ¶
func (this *DbMongoSvc) GetAppDataListWithWhereAndOrder(ctx context.Context, data dbmodel.IDbModelMongo, whereMap map[string]interface{}, sortMap map[string]interface{}, fromIndex int64, limitCount int64) (error, []dbmodel.IDbModelMongo)
获取一个数据列表,带条件和排序
func (*DbMongoSvc) GetAppDataWithWhereAndOrder ¶
func (this *DbMongoSvc) GetAppDataWithWhereAndOrder(ctx context.Context, data dbmodel.IDbModelMongo, whereMap map[string]interface{}, sortMap map[string]interface{}) error
获取一个数据对象,带条件和排序
func (*DbMongoSvc) GetDataPageList ¶
func (this *DbMongoSvc) GetDataPageList(ctx context.Context, data dbmodel.IDbModelMongo, whereMap map[string]interface{}, sortMap map[string]interface{}, pageNo int, pageSize int) dbmodel.PageData
分页获取数据
func (*DbMongoSvc) GetDbHandle ¶
func (*DbMongoSvc) GetFirstIngressActionBackendNodeByBackendId ¶
func (this *DbMongoSvc) GetFirstIngressActionBackendNodeByBackendId(ctx context.Context, backendId string) dbmodel.AppDataIngressActionBackendNode
func (*DbMongoSvc) GetFirstIngressModelByNamespaceId ¶
func (this *DbMongoSvc) GetFirstIngressModelByNamespaceId(ctx context.Context, namespaceId string, data dbmodel.IDbModelMongo)
func (*DbMongoSvc) GetFirstIngressSiteByActionValue ¶
func (this *DbMongoSvc) GetFirstIngressSiteByActionValue(ctx context.Context, actionValue string) dbmodel.AppDataIngressSite
func (*DbMongoSvc) GetFirstIngressSiteRuleByActionValue ¶
func (this *DbMongoSvc) GetFirstIngressSiteRuleByActionValue(ctx context.Context, actionValue string) dbmodel.AppDataIngressSiteRule
func (*DbMongoSvc) GetFirstIngressSiteRuleBySiteId ¶
func (this *DbMongoSvc) GetFirstIngressSiteRuleBySiteId(ctx context.Context, siteId string) dbmodel.AppDataIngressSiteRule
func (*DbMongoSvc) GetIngressActionBackendByTitle ¶
func (this *DbMongoSvc) GetIngressActionBackendByTitle(ctx context.Context, title string) dbmodel.AppDataIngressActionBackend
func (*DbMongoSvc) GetIngressActionBackendNodeByTitle ¶
func (this *DbMongoSvc) GetIngressActionBackendNodeByTitle(ctx context.Context, title string) dbmodel.AppDataIngressActionBackendNode
func (*DbMongoSvc) GetIngressActionStaticByTitle ¶
func (this *DbMongoSvc) GetIngressActionStaticByTitle(ctx context.Context, title string) dbmodel.AppDataIngressActionStatic
func (*DbMongoSvc) GetIngressConfigByNamespaceAndVersion ¶
func (this *DbMongoSvc) GetIngressConfigByNamespaceAndVersion(ctx context.Context, namespaceId string, version string) dbmodel.AppDataIngressConfig
func (*DbMongoSvc) GetIngressNamespaceByTitle ¶
func (this *DbMongoSvc) GetIngressNamespaceByTitle(ctx context.Context, title string) dbmodel.AppDataIngressNamespace
func (*DbMongoSvc) GetIngressSiteByTitle ¶
func (this *DbMongoSvc) GetIngressSiteByTitle(ctx context.Context, title string) dbmodel.AppDataIngressSite
func (*DbMongoSvc) GetIngressSiteRuleByTitle ¶
func (this *DbMongoSvc) GetIngressSiteRuleByTitle(ctx context.Context, title string) dbmodel.AppDataIngressSiteRule
func (*DbMongoSvc) GetIngressWorkerByToken ¶
func (this *DbMongoSvc) GetIngressWorkerByToken(ctx context.Context, nodeToken string) dbmodel.AppDataIngressWorker
func (*DbMongoSvc) GetTableHandle ¶
func (this *DbMongoSvc) GetTableHandle(ctx context.Context, dbName string, tableName string) (error, *mongo.Collection)
func (*DbMongoSvc) PublishNamespaceConfig ¶
func (this *DbMongoSvc) PublishNamespaceConfig(ctx context.Context, namespaceId string) error
func (*DbMongoSvc) RemoveIngressConfigByNamespaceId ¶
func (this *DbMongoSvc) RemoveIngressConfigByNamespaceId(ctx context.Context, namespaceId string)
func (*DbMongoSvc) RemoveIngressWorkerByNamespaceId ¶
func (this *DbMongoSvc) RemoveIngressWorkerByNamespaceId(ctx context.Context, namespaceId string)
func (*DbMongoSvc) UpdateAppData ¶
func (this *DbMongoSvc) UpdateAppData(ctx context.Context, data dbmodel.IDbModelMongo, whereMap map[string]interface{}) error
func (*DbMongoSvc) UpdateAppDataById ¶
func (this *DbMongoSvc) UpdateAppDataById(ctx context.Context, data dbmodel.IDbModelMongo) error
func (*DbMongoSvc) UpdateIngressActionBackendNodeCount ¶
func (this *DbMongoSvc) UpdateIngressActionBackendNodeCount(ctx context.Context, backendId string)
func (*DbMongoSvc) UpdateNamespaceLastVer ¶
func (this *DbMongoSvc) UpdateNamespaceLastVer(ctx context.Context, namespaceId string)
Click to show internal directories.
Click to hide internal directories.