Documentation ¶
Index ¶
- type IWebsiteConfigDao
- type WebsiteConfig
- type WebsiteConfigDao
- func (d *WebsiteConfigDao) AddTPSVConfig(ctx context.Context, tpsv domain.TPSV) error
- func (d *WebsiteConfigDao) Decrease(ctx context.Context, field string) error
- func (d *WebsiteConfigDao) DeleteTPSVConfigByKey(ctx context.Context, key string) error
- func (d *WebsiteConfigDao) FindByFilter(ctx context.Context, filter bson.D) (*WebsiteConfig, error)
- func (d *WebsiteConfigDao) FindByTyp(ctx context.Context, typ string) (*WebsiteConfig, error)
- func (d *WebsiteConfigDao) GetByTypes(ctx context.Context, types ...string) ([]*WebsiteConfig, error)
- func (d *WebsiteConfigDao) Increase(ctx context.Context, field string) error
- func (d *WebsiteConfigDao) PushCarouselConfig(ctx context.Context, carouselElem domain.CarouselElem) error
- func (d *WebsiteConfigDao) UpdateByConditionAndUpdates(ctx context.Context, cond bson.D, updates bson.D) error
- func (d *WebsiteConfigDao) UpdatePostIndexProps(ctx context.Context, updates bson.D) error
- func (d *WebsiteConfigDao) UpdatePropsByTyp(ctx context.Context, typ string, cfg any, now time.Time) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IWebsiteConfigDao ¶
type IWebsiteConfigDao interface { FindByTyp(ctx context.Context, typ string) (*WebsiteConfig, error) Increase(ctx context.Context, field string) error GetByTypes(ctx context.Context, types ...string) ([]*WebsiteConfig, error) Decrease(ctx context.Context, field string) error UpdateByConditionAndUpdates(ctx context.Context, cond bson.D, updates bson.D) error UpdatePropsByTyp(ctx context.Context, typ string, cfg any, now time.Time) error AddTPSVConfig(ctx context.Context, tpsv domain.TPSV) error DeleteTPSVConfigByKey(ctx context.Context, key string) error UpdatePostIndexProps(ctx context.Context, updates bson.D) error PushCarouselConfig(ctx context.Context, carouselElem domain.CarouselElem) error FindByFilter(ctx context.Context, filter bson.D) (*WebsiteConfig, error) }
type WebsiteConfig ¶
type WebsiteConfig struct { mongox.Model `bson:",inline"` Props any `bson:"props"` Typ string `bson:"typ"` }
WebsiteConfig defines for the MongoDB Collection "website_config"
type WebsiteConfigDao ¶
type WebsiteConfigDao struct {
// contains filtered or unexported fields
}
func NewWebsiteConfigDao ¶
func NewWebsiteConfigDao(db *mongo.Database) *WebsiteConfigDao
func (*WebsiteConfigDao) AddTPSVConfig ¶
func (*WebsiteConfigDao) Decrease ¶
func (d *WebsiteConfigDao) Decrease(ctx context.Context, field string) error
func (*WebsiteConfigDao) DeleteTPSVConfigByKey ¶
func (d *WebsiteConfigDao) DeleteTPSVConfigByKey(ctx context.Context, key string) error
func (*WebsiteConfigDao) FindByFilter ¶
func (d *WebsiteConfigDao) FindByFilter(ctx context.Context, filter bson.D) (*WebsiteConfig, error)
func (*WebsiteConfigDao) FindByTyp ¶
func (d *WebsiteConfigDao) FindByTyp(ctx context.Context, typ string) (*WebsiteConfig, error)
func (*WebsiteConfigDao) GetByTypes ¶
func (d *WebsiteConfigDao) GetByTypes(ctx context.Context, types ...string) ([]*WebsiteConfig, error)
func (*WebsiteConfigDao) Increase ¶
func (d *WebsiteConfigDao) Increase(ctx context.Context, field string) error
func (*WebsiteConfigDao) PushCarouselConfig ¶
func (d *WebsiteConfigDao) PushCarouselConfig(ctx context.Context, carouselElem domain.CarouselElem) error
func (*WebsiteConfigDao) UpdateByConditionAndUpdates ¶
func (*WebsiteConfigDao) UpdatePostIndexProps ¶
func (*WebsiteConfigDao) UpdatePropsByTyp ¶
Click to show internal directories.
Click to hide internal directories.