Documentation ¶
Index ¶
- type Activity
- type Author
- type ByBestRated
- type ByCommentCreatedAt
- type ByCreatedAt
- type ByElectionsCreatedAt
- type Categories
- type CategoriesOrder
- type Category
- type CategoryAcl
- type CategoryCounter
- type CategoryCounters
- type Comment
- type CommentAggregated
- type CommentForm
- type Comments
- type CommentsPost
- type Component
- type Components
- type Counter
- type ElectionForm
- type ElectionOption
- type FeedComments
- type FeedPost
- type FeedPostStat
- type GamingRules
- type MentionModel
- type Notification
- type PartByModel
- type Post
- type PostCommentCountModel
- type PostCommentModel
- type PostCounter
- type PostForm
- type RuleModel
- type SitemapSet
- type SitemapUrl
- type Stats
- type StatsComments
- type User
- type UserActivity
- type UserFirebase
- type UserFirebaseNotification
- type UserFirebaseNotifications
- type UserFollowing
- type UserGaming
- type UserPc
- type UserProfileForm
- type UserRegisterForm
- type UserRole
- type UserStats
- type UserSubscribe
- type UserSubscribeForm
- type UserToken
- type Vote
- type VoteCommentForm
- type VoteForm
- type VotePostForm
- type Votes
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Activity ¶
type Activity struct { Id bson.ObjectId `bson:"_id,omitempty" json:"id"` UserId bson.ObjectId `bson:"user_id,omitempty" json:"user_id"` Event string `bson:"event,omitempty" event:"related"` RelatedId bson.ObjectId `bson:"related_id,omitempty" json:"related_id,omitempty"` List []bson.ObjectId `bson:"list,omitempty" json:"list,omitempty"` Created time.Time `bson:"created_at" json:"created_at"` }
type ByBestRated ¶
type ByBestRated []FeedPost
func (ByBestRated) Len ¶
func (slice ByBestRated) Len() int
func (ByBestRated) Less ¶
func (slice ByBestRated) Less(i, j int) bool
func (ByBestRated) Swap ¶
func (slice ByBestRated) Swap(i, j int)
type ByCommentCreatedAt ¶
type ByCommentCreatedAt []Comment
ByCommentCreatedAt implements sort.Interface for []ElectionOption based on Created field
func (ByCommentCreatedAt) Len ¶
func (a ByCommentCreatedAt) Len() int
func (ByCommentCreatedAt) Less ¶
func (a ByCommentCreatedAt) Less(i, j int) bool
func (ByCommentCreatedAt) Swap ¶
func (a ByCommentCreatedAt) Swap(i, j int)
type ByCreatedAt ¶
type ByCreatedAt []UserActivity
func (ByCreatedAt) Len ¶
func (a ByCreatedAt) Len() int
func (ByCreatedAt) Less ¶
func (a ByCreatedAt) Less(i, j int) bool
func (ByCreatedAt) Swap ¶
func (a ByCreatedAt) Swap(i, j int)
type ByElectionsCreatedAt ¶
type ByElectionsCreatedAt []ElectionOption
ByElectionsCreatedAt implements sort.Interface for []ElectionOption based on Created field
func (ByElectionsCreatedAt) Len ¶
func (a ByElectionsCreatedAt) Len() int
func (ByElectionsCreatedAt) Less ¶
func (a ByElectionsCreatedAt) Less(i, j int) bool
func (ByElectionsCreatedAt) Swap ¶
func (a ByElectionsCreatedAt) Swap(i, j int)
type Categories ¶
type Categories []Category
func (Categories) Len ¶
func (slice Categories) Len() int
func (Categories) Less ¶
func (slice Categories) Less(i, j int) bool
func (Categories) Swap ¶
func (slice Categories) Swap(i, j int)
type CategoriesOrder ¶
type CategoriesOrder []Category
func (CategoriesOrder) Len ¶
func (slice CategoriesOrder) Len() int
func (CategoriesOrder) Less ¶
func (slice CategoriesOrder) Less(i, j int) bool
func (CategoriesOrder) Swap ¶
func (slice CategoriesOrder) Swap(i, j int)
type Category ¶
type Category struct { Id bson.ObjectId `bson:"_id,omitempty" json:"id,omitempty"` Name string `bson:"name" json:"name"` Description string `bson:"description" json:"description"` Slug string `bson:"slug" json:"slug"` Color string `bson:"color" json:"color"` Permissions CategoryAcl `bson:"permissions" json:"permissions"` Parent bson.ObjectId `bson:"parent,omitempty" json:"parent,omitempty"` Order int `bson:"order,omitempty" json:"order,omitempty"` Count int `bson:"count,omitempty" json:"count,omitempty"` Recent int `bson:"recent,omitempty" json:"recent,omitempty"` Child []Category `bson:"subcategories,omitempty" json:"subcategories,omitempty"` }
type CategoryAcl ¶
type CategoryCounter ¶
type CategoryCounters ¶
type CategoryCounters struct {
List []CategoryCounter `json:"list"`
}
type Comment ¶
type Comment struct { UserId bson.ObjectId `bson:"user_id" json:"user_id"` Votes Votes `bson:"votes" json:"votes"` User interface{} `bson:"-" json:"author,omitempty"` Position int `bson:"position" json:"position"` Liked int `bson:"-" json:"liked,omitempty"` Content string `bson:"content" json:"content"` Chosen bool `bson:"chosen,omitempty" json:"chosen,omitempty"` Created time.Time `bson:"created_at" json:"created_at"` Deleted time.Time `bson:"deleted_at" json:"deleted_at"` }
type CommentAggregated ¶
type CommentForm ¶
type CommentForm struct {
Content string `json:"content" binding:"required"`
}
type CommentsPost ¶
type Component ¶
type Component struct { Content string `bson:"content" json:"content"` Elections bool `bson:"elections" json:"elections"` Options []ElectionOption `bson:"options,omitempty" json:"options"` Votes Votes `bson:"votes" json:"votes"` Status string `bson:"status" json:"status"` Voted string `bson:"voted,omitempty" json:"voted,omitempty"` }
type Components ¶
type Components struct { Cpu Component `bson:"cpu,omitempty" json:"cpu,omitempty"` Motherboard Component `bson:"motherboard,omitempty" json:"motherboard,omitempty"` Ram Component `bson:"ram,omitempty" json:"ram,omitempty"` Storage Component `bson:"storage,omitempty" json:"storage,omitempty"` Cooler Component `bson:"cooler,omitempty" json:"cooler,omitempty"` Power Component `bson:"power,omitempty" json:"power,omitempty"` Cabinet Component `bson:"cabinet,omitempty" json:"cabinet,omitempty"` Screen Component `bson:"screen,omitempty" json:"screen,omitempty"` Videocard Component `bson:"videocard,omitempty" json:"videocard,omitempty"` Software string `bson:"software,omitempty" json:"software,omitempty"` Budget string `bson:"budget,omitempty" json:"budget,omitempty"` BudgetCurrency string `bson:"budget_currency,omitempty" json:"budget_currency,omitempty"` BudgetType string `bson:"budget_type,omitempty" json:"budget_type,omitempty"` BudgetFlexibility string `bson:"budget_flexibility,omitempty" json:"budget_flexibility,omitempty"` }
type Counter ¶
type Counter struct { UserId bson.ObjectId `bson:"user_id" json:"user_id"` Counters map[string]PostCounter `bson:"counters" json:"counters"` }
type ElectionForm ¶
type ElectionOption ¶
type FeedComments ¶
type FeedComments struct {
Count int `bson:"count" json:"count"`
}
type FeedPost ¶
type FeedPost struct { Id bson.ObjectId `bson:"_id,omitempty" json:"id,omitempty"` Title string `bson:"title" json:"title"` Slug string `bson:"slug" json:"slug"` Type string `bson:"type" json:"type"` Categories []string `bson:"categories" json:"categories"` Users []bson.ObjectId `bson:"users,omitempty" json:"users,omitempty"` Category bson.ObjectId `bson:"category" json:"category"` Comments FeedComments `bson:"comments" json:"comments"` Author User `bson:"author,omitempty" json:"author,omitempty"` UserId bson.ObjectId `bson:"user_id,omitempty" json:"user_id,omitempty"` Votes Votes `bson:"votes" json:"votes"` Pinned bool `bson:"pinned,omitempty" json:"pinned,omitempty"` Solved bool `bson:"solved,omitempty" json:"solved,omitempty"` IsQuestion bool `bson:"is_question" json:"is_question"` Stats FeedPostStat `bson:"stats,omitempty" json:"stats"` Created time.Time `bson:"created_at" json:"created_at"` Updated time.Time `bson:"updated_at" json:"updated_at"` }
type FeedPostStat ¶
type FeedPostStat struct { Viewed int `bson:"viewed,omitempty" json:"viewed"` Reached int `bson:"reached,omitempty" json:"reached"` ViewRate float64 `bson:"view_rate,omitempty" json:"view_rate"` CommentRate float64 `bson:"comment_rate,omitempty" json:"comment_rate"` FinalRate float64 `bson:"final_rate,omitempty" json:"final_rate"` }
type GamingRules ¶
type MentionModel ¶
type Notification ¶
type Notification struct { Id bson.ObjectId `bson:"_id,omitempty" json:"id,omitempty"` UserId bson.ObjectId `bson:"user_id" json:"user_id"` RelatedId bson.ObjectId `bson:"related_id" json:"related_id"` Title string `bson:"title" json:"title"` Text string `bson:"text" json:"text"` Link string `bson:"link" json:"link"` Related string `bson:"related" json:"related"` Seen bool `bson:"seen" json:"seen"` Image string `bson:"image" json:"image"` Created time.Time `bson:"created_at" json:"created_at"` Updated time.Time `bson:"updated_at" json:"updated_at"` }
type PartByModel ¶
type PartByModel struct { Id bson.ObjectId `bson:"_id,omitempty" json:"id"` Name string `bson:"name" json:"name"` Type string `bson:"type" json:"type"` Slug string `bson:"slug" json:"slug"` Price float64 `bson:"price" json:"price"` Manufacturer string `bson:"manufacturer,omitempty" json:"manufacturer,omitempty"` PartNumber string `bson:"partnumber,omitempty" json:"partnumber,omitempty"` Model string `bson:"model,omitempty" json:"model,omitempty"` Socket string `bson:"supported_sockets,omitempty" json:"supported_sockets,omitempty"` LiquidCooled bool `bson:"liquid_cooled,omitempty" json:"liquid_cooled,omitempty"` BearingType string `bson:"bearing_type,omitempty" json:"bearing_type,omitempty"` NoiseLevel string `bson:"noise_level,omitempty" json:"noise_level,omitempty"` FanRpm string `bson:"fan_rpm,omitempty" json:"fan_rpm,omitempty"` Speed string `bson:"speed,omitempty" json:"speed,omitempty"` Size string `bson:"size,omitempty" json:"size,omitempty"` PriceGb string `bson:"gb_price,omitempty" json:"gb_price,omitempty"` Cas string `bson:"cas,omitempty" json:"cas,omitempty"` Voltage string `bson:"voltage,omitempty" json:"voltage,omitempty"` HeatSpreader bool `bson:"heat_spreader,omitempty" json:"heat_spreader,omitempty"` Ecc bool `bson:"ecc,omitempty" json:"ecc,omitempty"` Registered bool `bson:"registered,omitempty" json:"registered,omitempty"` Color string `bson:"color,omitempty" json:"color,omitempty"` Chipset string `bson:"chipset,omitempty" json:"chipset,omitempty"` MemorySlots string `bson:"memory_slots,omitempty" json:"memory_slots,omitempty"` MemoryType string `bson:"memory_type,omitempty" json:"memory_type,omitempty"` MaxMemory string `bson:"memory_max,omitempty" json:"memory_max,omitempty"` RaidSupport bool `bson:"raid_support,omitempty" json:"raid_support,omitempty"` OnboardVideo bool `bson:"onboard_video,omitempty" json:"onboard_video,omitempty"` Crossfire bool `bson:"crossfire_support,omitempty" json:"crossfire_support,omitempty"` SliSupport bool `bson:"sli_support,omitempty" json:"sli_support,omitempty"` SATA string `bson:"sata_6gbs" json:"sata_6gbs"` OnboardEthernet string `bson:"onboard_ethernet,omitempty" json:"onboard_ethernet,omitempty"` OnboardUsb3 bool `bson:"onboard_usb_3,omitempty" json:"onboard_usb_3,omitempty"` Capacity string `bson:"capacity,omitempty" json:"capacity,omitempty"` Interface string `bson:"interface,omitempty" json:"interface,omitempty"` Cache string `bson:"cache,omitempty" json:"cache,omitempty"` SsdController string `bson:"ssd_controller,omitempty" json:"ssd_controller,omitempty"` FormFactor string `bson:"form_factor,omitempty" json:"form_factor,omitempty"` GbPerDollar string `bson:"gb_per_dollar,omitempty" json:"gb_per_dollar,omitempty"` }
type Post ¶
type Post struct { Id bson.ObjectId `bson:"_id,omitempty" json:"id,omitempty"` Title string `bson:"title" json:"title"` Slug string `bson:"slug" json:"slug"` Type string `bson:"type" json:"type"` Content string `bson:"content" json:"content"` Categories []string `bson:"categories" json:"categories"` Category bson.ObjectId `bson:"category" json:"category"` Comments Comments `bson:"comments" json:"comments"` Author User `bson:"-" json:"author,omitempty"` UserId bson.ObjectId `bson:"user_id,omitempty" json:"user_id,omitempty"` Users []bson.ObjectId `bson:"users,omitempty" json:"users,omitempty"` Votes Votes `bson:"votes" json:"votes"` Components Components `bson:"components,omitempty" json:"components,omitempty"` RelatedComponents []bson.ObjectId `bson:"related_components,omitempty" json:"related_components,omitempty"` Following bool `bson:"following,omitempty" json:"following,omitempty"` Pinned bool `bson:"pinned,omitempty" json:"pinned,omitempty"` Lock bool `bson:"lock" json:"lock"` IsQuestion bool `bson:"is_question" json:"is_question"` Solved bool `bson:"solved,omitempty" json:"solved,omitempty"` Liked int `bson:"liked,omitempty" json:"liked,omitempty"` Created time.Time `bson:"created_at" json:"created_at"` Updated time.Time `bson:"updated_at" json:"updated_at"` Deleted time.Time `bson:"deleted_at,omitempty" json:"deleted_at,omitempty"` }
type PostCommentCountModel ¶
type PostCommentModel ¶
type PostCounter ¶
type PostForm ¶
type PostForm struct { Kind string `json:"kind" binding:"required"` Title string `json:"title" binding:"required"` Content string `json:"content" binding:"required"` Budget string `json:"budget"` Currency string `json:"currency"` Moves string `json:"moves"` Software string `json:"software"` Tag string `json:"tag"` Category string `json:"category"` IsQuestion bool `json:"is_question"` Pinned bool `json:"pinned"` Lock bool `json:"lock"` Components map[string]interface{} `json:"components"` }
type SitemapSet ¶
type SitemapUrl ¶
type StatsComments ¶
type User ¶
type User struct { Id bson.ObjectId `bson:"_id,omitempty" json:"id"` FirstName string `bson:"first_name" json:"first_name"` LastName string `bson:"last_name" json:"last_name"` UserName string `bson:"username" json:"username"` UserNameSlug string `bson:"username_slug" json:"username_slug"` NameChanges int `bson:"name_changes" json:"name_changes"` Password string `bson:"password" json:"-"` Step int `bson:"step,omitempty" json:"step"` Email string `bson:"email" json:"email,omitempty"` Categories []bson.ObjectId `bson:"categories,omitempty" json:"categories,omitempty"` Roles []UserRole `bson:"roles" json:"roles,omitempty"` Permissions []string `bson:"permissions" json:"permissions,omitempty"` Description string `bson:"description" json:"description,omitempty"` Image string `bson:"image" json:"image,omitempty"` Facebook interface{} `bson:"facebook,omitempty" json:"facebook,omitempty"` Notifications interface{} `bson:"notifications,omitempty" json:"notifications,omitempty"` Profile map[string]interface{} `bson:"profile,omitempty" json:"profile,omitempty"` Gaming UserGaming `bson:"gaming,omitempty" json:"gaming,omitempty"` Stats UserStats `bson:"stats,omitempty" json:"stats,omitempty"` Version string `bson:"version,omitempty" json:"version,omitempty"` Validated bool `bson:"validated" json:"validated"` Seen *time.Time `bson:"last_seen_at" json:"last_seen_at,omitempty"` Created time.Time `bson:"created_at" json:"created_at"` Updated time.Time `bson:"updated_at" json:"updated_at"` }
type UserActivity ¶
type UserFirebase ¶
type UserFirebaseNotification ¶
type UserFirebaseNotification struct { UserId bson.ObjectId `json:"user_id"` RelatedId bson.ObjectId `json:"related_id"` RelatedExtra string `bson:"related_extra" json:"related_extra"` Position string `bson:"position,omitempty" json:"position,omitempty"` Title string `json:"title,omitempty"` Username string `json:"username,omitempty"` Text string `json:"text"` Related string `json:"related"` Seen bool `json:"seen"` Image string `json:"image"` Created time.Time `json:"created_at"` Updated time.Time `json:"updated_at"` }
type UserFirebaseNotifications ¶
type UserFirebaseNotifications struct { Count int `json:"count"` List map[string]UserFirebaseNotification `json:"list,omitempty"` }
type UserFollowing ¶
type UserFollowing struct { Id bson.ObjectId `bson:"_id,omitempty" json:"id"` Follower bson.ObjectId `bson:"follower,omitempty" json:"follower"` Following bson.ObjectId `bson:"following,omitempty" json:"following"` Notifications bool `bson:"notifications,omitempty" json:"notifications"` Created time.Time `bson:"created_at" json:"created_at"` }
type UserGaming ¶
type UserProfileForm ¶
type UserProfileForm struct { UserName string `json:"username,omitempty"` Description string `json:"description,omitempty"` Password string `json:"password,omitempty"` OPassword string `json:"old_password,omitempty"` Email string `json:"email,omitempty"` Phone string `json:"phone,omitempty"` Country string `json:"country,omitempty"` OriginId string `json:"origin_id,omitempty"` BattlenetId string `json:"battlenet_id,omitempty"` SteamId string `json:"steam_id,omitempty"` }
type UserRegisterForm ¶
type UserSubscribe ¶
type UserSubscribeForm ¶
type UserToken ¶
type UserToken struct { Id bson.ObjectId `bson:"_id,omitempty" json:"id,omitempty"` UserId bson.ObjectId `bson:"user_id" json:"user_id"` Token string `bson:"token" json:"token"` Closed bool `bson:"closed,omitempty" json"closed,omitempty"` Created time.Time `bson:"created_at" json:"created_at"` Updated time.Time `bson:"updated_at" json:"updated_at"` }
type Vote ¶
type Vote struct { Id bson.ObjectId `bson:"_id,omitempty" json:"id,omitempty"` UserId bson.ObjectId `bson:"user_id" json:"user_id"` Type string `bson:"type" json:"type"` NestedType string `bson:"nested_type,omitempty" json:"nested_type,omitempty"` RelatedId bson.ObjectId `bson:"related_id" json:"related_id"` Value int `bson:"value" json:"value"` Created time.Time `bson:"created_at" json:"created_at"` }
type VoteCommentForm ¶
type VotePostForm ¶
type VotePostForm struct {
Direction string `json:"direction" binding:"required"`
}
Click to show internal directories.
Click to hide internal directories.