Documentation ¶
Index ¶
Constants ¶
View Source
const MarkIndexMapping = `` /* 737-byte string literal not displayed */
View Source
const MarkIndexName = "marks"
Variables ¶
View Source
var Enable bool // if not, jump ES processing
View Source
var NotEnabledError = fmt.Errorf("es is not enabled yet")
Functions ¶
func MarkIndexDelete ¶
func SetupMarkIndex ¶
func SetupMarkIndex() error
Types ¶
type CommentIndex ¶
type CommentIndex struct { Comment string `json:"comment"` // contains filtered or unexported fields }
CommentIndex is part of MarkIndex. Only update CommentIndex on existed MarkIndex.
func NewCommentIndex ¶
func NewCommentIndex(c *models.Comment) *CommentIndex
func (*CommentIndex) Update ¶
func (commentIndex *CommentIndex) Update() (*elastic.UpdateResponse, error)
POST /mark/_update/:markID
{ "doc": { "comment": "actually" } }
type MarkIndex ¶
type MarkIndex struct { ID uint `json:"id"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` UserID uint `json:"user_id"` URL string `json:"url"` Tag string `json:"tag"` HashKey string `json:"hash_key"` Selection string `json:"selection"` Comment string `json:"comment"` // contains filtered or unexported fields }
func NewMarkIndex ¶
type SetupMethod ¶
type SetupMethod func() error
Click to show internal directories.
Click to hide internal directories.