Documentation
¶
Index ¶
- type DataStore
- func (s *DataStore) Counts(siteID string, postIDs []string) ([]store.PostInfo, error)
- func (s *DataStore) Create(comment store.Comment) (commentID string, err error)
- func (s *DataStore) EditComment(locator store.Locator, commentID string, req EditRequest) (comment store.Comment, err error)
- func (s *DataStore) IsVerifiedFn() func(siteID string, userID string) bool
- func (s *DataStore) SetPin(locator store.Locator, commentID string, status bool) error
- func (s *DataStore) ValidateComment(c *store.Comment) error
- func (s *DataStore) Vote(locator store.Locator, commentID string, userID string, val bool) (comment store.Comment, err error)
- type EditRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataStore ¶
type DataStore struct { engine.Interface EditDuration time.Duration Secret string MaxCommentSize int // contains filtered or unexported fields }
DataStore wraps store.Interface with additional methods
func (*DataStore) EditComment ¶
func (s *DataStore) EditComment(locator store.Locator, commentID string, req EditRequest) (comment store.Comment, err error)
EditComment to edit text and update Edit info
func (*DataStore) IsVerifiedFn ¶
IsVerifiedFn returns func to check if user verified or not
func (*DataStore) ValidateComment ¶
ValidateComment checks if comment size below max and user fields set
type EditRequest ¶
EditRequest contains fields needed for comment update
Click to show internal directories.
Click to hide internal directories.