Skip to content

Commit

Permalink
allow empty feedback types in config (#624)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhenghaoz authored Feb 16, 2023
1 parent 4a4ff90 commit a2b9e60
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,10 @@ type RecommendConfig struct {
}

type DataSourceConfig struct {
PositiveFeedbackTypes []string `mapstructure:"positive_feedback_types" validate:"min=1,dive,required"` // positive feedback type
ReadFeedbackTypes []string `mapstructure:"read_feedback_types" validate:"min=1,dive,required"` // feedback type for read event
PositiveFeedbackTTL uint `mapstructure:"positive_feedback_ttl" validate:"gte=0"` // time-to-live of positive feedbacks
ItemTTL uint `mapstructure:"item_ttl" validate:"gte=0"` // item-to-live of items
PositiveFeedbackTypes []string `mapstructure:"positive_feedback_types"` // positive feedback type
ReadFeedbackTypes []string `mapstructure:"read_feedback_types"` // feedback type for read event
PositiveFeedbackTTL uint `mapstructure:"positive_feedback_ttl" validate:"gte=0"` // time-to-live of positive feedbacks
ItemTTL uint `mapstructure:"item_ttl" validate:"gte=0"` // item-to-live of items
}

type PopularConfig struct {
Expand Down

0 comments on commit a2b9e60

Please sign in to comment.