Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AllHandlers ¶
type AllHandlers struct {
// contains filtered or unexported fields
}
AllHandlers contains multiple feedback HTTP handlers
func Handlers ¶
func Handlers(ideaService IdeaService) AllHandlers
Handlers handles feedback based page
func (AllHandlers) Details ¶
func (h AllHandlers) Details() app.HandlerFunc
Details shows details of given Idea by id
func (AllHandlers) PostComment ¶
func (h AllHandlers) PostComment() app.HandlerFunc
PostComment creates a new comment on given idea
func (AllHandlers) PostIdea ¶
func (h AllHandlers) PostIdea() app.HandlerFunc
PostIdea creates a new idea on current tenant
type Comment ¶
type Comment struct { ID int `json:"id"` Content string `json:"content"` CreatedOn time.Time `json:"createdOn"` User app.User `json:"user"` }
Comment represents an user comment on an idea
type Idea ¶
type Idea struct { ID int `json:"id"` Title string `json:"title"` Description string `json:"description"` CreatedOn time.Time `json:"createdOn"` User app.User `json:"user"` }
Idea represents an idea on a tenant board
type IdeaService ¶
type IdeaService interface { GetByID(tenantID, ideaID int) (*Idea, error) GetCommentsByIdeaID(tenantID, ideaID int) ([]*Comment, error) GetAll(tenantID int) ([]*Idea, error) Save(tenantID, userID int, title, description string) (*Idea, error) AddComment(userID, ideaID int, content string) (int, error) }
IdeaService contains read and write operations for ideas
Click to show internal directories.
Click to hide internal directories.