Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Comment ¶
type Comment struct { ID string `jsonapi:"primary,comments"` Body string `jsonapi:"attr,body"` ItemID int `jsonapi:"attr,item_id"` }
Comment represents a comment
type CommentDatastore ¶
type CommentDatastore struct {
// contains filtered or unexported fields
}
CommentDatastore implements the Repository interface
func NewCommentDatastore ¶
func NewCommentDatastore(db *sql.DB) *CommentDatastore
NewCommentDatastore constructs a new Repository
func (*CommentDatastore) Create ¶
func (ds *CommentDatastore) Create(usr *user.User, cmt *Comment) error
Create creates new comments
func (*CommentDatastore) List ¶
func (ds *CommentDatastore) List(itmID int) ([]*Comment, error)
List searches for comments under an item
func (*CommentDatastore) Valid ¶
func (ds *CommentDatastore) Valid(cmt *Comment) error
Valid checks the validity of the comment
type CommentRepository ¶
type CommentRepository interface { Create(usr *user.User, cmt *Comment) error Valid(itm *Comment) error List(itm int) ([]*Comment, error) }
CommentRepository to manage items
type Datastore ¶
type Datastore struct {
// contains filtered or unexported fields
}
Datastore implements the Repository interface
func NewDatastore ¶
func NewDatastore(db *sql.DB, bi *search.BleveIndex) *Datastore
NewDatastore constructs a new Repository
type Item ¶
type Item struct { ID int `jsonapi:"primary,items"` Title string `jsonapi:"attr,title"` Description string `jsonapi:"attr,description"` Number string `jsonapi:"attr,num"` ProjectID string `jsonapi:"attr,project_id"` OpenState bool `jsonapi:"attr,open_state"` LockConversation bool `jsonapi:"attr,lock_conversation"` CreatedBy string `jsonapi:"attr,created_by"` UpdatedBy *string `jsonapi:"attr,updated_by"` Assignees pq.StringArray Subscribers pq.StringArray Labels pq.StringArray CreatedAt time.Time UpdatedAt *time.Time Comments []*Comment `jsonapi:"relation,comments"` }
Item represents an item
Click to show internal directories.
Click to hide internal directories.