Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SocialFeed ¶
type SocialFeed struct { ID int64 `json:"id"` UserID int32 `json:"user_id"` ObservableType string `json:"observable_type"` ObservableID string `json:"observable_id"` EventType string `json:"event_type"` TargetType string `json:"target_type"` TargetID string `json:"target_id"` Summary string `json:"summary"` }
SocialFeed acts as the super class of NewsFeed and Notification
func (*SocialFeed) GenerateID ¶
func (sf *SocialFeed) GenerateID() error
GenerateID generates a new SocialFeed.ID and sync SocialFeed.Summary.
func (*SocialFeed) ValidateID ¶
func (sf *SocialFeed) ValidateID() error
ValidateID validates SocialFeed.ID is present.
func (*SocialFeed) ValidateSummary ¶
func (sf *SocialFeed) ValidateSummary() error
ValidateSummary validates SocialFeed.Summary. 1) SocialFeed.Summary should be a valid JSON string. 2) SocialFeed.Summary must have "id" included after deserializing. 3) The former "id" must be a stringified SocialFeed.ID.
func (*SocialFeed) ValidateUserID ¶
func (sf *SocialFeed) ValidateUserID() error
ValidateUserID validates SocialFeed.UserID is present.
Click to show internal directories.
Click to hide internal directories.