Documentation
¶
Index ¶
- func NewHandler(tasksSvc *tasks.Service, commentsSvc *comments.Service, ...) handler.Handler
- type AttachmentConfirmResponse
- type AttachmentDownloadResponse
- type AttachmentResponse
- type AttachmentUploadRequest
- type AttachmentUploadResponse
- type CommentCreateRequest
- type CommentResponse
- type CommentUpdateRequest
- type Handler
- type TaskCreateRequest
- type TaskDetailsResponse
- type TaskListQuery
- type TaskListResponse
- type TaskResponse
- type TaskUpdateRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AttachmentDownloadResponse ¶
type AttachmentDownloadResponse struct {
DownloadURL string `json:"download_url"`
}
type AttachmentResponse ¶
type AttachmentUploadRequest ¶
type CommentCreateRequest ¶
type CommentCreateRequest struct {
Content string `json:"content" validate:"required,min=1,max=10000"`
}
CommentCreateRequest represents the request body for creating a new comment.
@Description Comment creation request with content.
type CommentResponse ¶
type CommentResponse struct {
ID int64 `json:"id"`
Author dto.UserBrief `json:"author"`
Content string `json:"content"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}
CommentResponse represents the API response for a single comment.
@Description Full comment details with author information.
type CommentUpdateRequest ¶
type CommentUpdateRequest struct {
Content string `json:"content" validate:"required,min=1,max=10000"`
}
CommentUpdateRequest represents the request body for updating a comment.
@Description Comment update request with content.
type TaskCreateRequest ¶
type TaskCreateRequest struct {
ProjectSlug string `json:"project_slug" validate:"required,max=255"`
Title string `json:"title" validate:"required,max=255"`
Description string `json:"description,omitempty" validate:"max=10000"`
Priority string `json:"priority,omitempty" validate:"omitempty,oneof=Trivial Minor Major Critical Blocker"`
Kind string `json:"kind,omitempty" validate:"omitempty,oneof=Bug Enhancement Task Proposal"`
AssigneeID *int64 `json:"assignee_id,omitempty" validate:"omitempty,min=1"`
DueDate *string `json:"due_date,omitempty" validate:"omitempty,datetime=2006-01-02"`
}
TaskCreateRequest represents the request body for creating a new task.
@Description Task creation request with title, description, priority, assignee, and due date.
type TaskDetailsResponse ¶
type TaskDetailsResponse struct {
TaskResponse
Comments []CommentResponse `json:"comments"`
Attachments []AttachmentResponse `json:"attachments"`
}
type TaskListQuery ¶
type TaskListQuery struct {
dto.PaginationQuery
dto.SortQuery
Project *string `query:"project" validate:"omitempty,max=255"`
Author *int64 `query:"author" validate:"omitempty,min=1"`
Assignee *int64 `query:"assignee" validate:"omitempty,min=0"`
Statuses *string `query:"statuses"`
Priorities *string `query:"priorities"`
}
TaskListQuery represents pagination and sorting query parameters.
type TaskListResponse ¶
type TaskListResponse struct {
Items []TaskResponse `json:"items"`
Total int `json:"total"`
}
TaskListResponse represents the API response for a list of tasks.
@Description Paginated list of tasks with total count.
type TaskResponse ¶
type TaskResponse struct {
ID int64 `json:"id"`
ProjectSlug string `json:"project_slug"`
Number int `json:"number"`
Title string `json:"title"`
Description string `json:"description,omitempty"`
Priority string `json:"priority"`
Status string `json:"status"`
Kind string `json:"kind,omitempty"`
Author dto.UserBrief `json:"author"`
Assignee *dto.UserBrief `json:"assignee,omitempty"`
DueDate *string `json:"due_date,omitempty"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}
TaskResponse represents the API response for a single task.
@Description Full task details with nested author and assignee information.
type TaskUpdateRequest ¶
type TaskUpdateRequest struct {
Title *string `json:"title,omitempty" validate:"omitempty,max=255"`
Description *string `json:"description,omitempty" validate:"omitempty,max=10000"`
Priority *string `json:"priority,omitempty" validate:"omitempty,oneof=Trivial Minor Major Critical Blocker" default:"Minor"`
Status *string `json:"status,omitempty" validate:"omitempty,oneof=New Open 'In Progress' Resolved Closed Reopened"`
Kind *string `json:"kind,omitempty" validate:"omitempty,oneof=Bug Enhancement Task Proposal" default:"Task"`
AssigneeID *int64 `json:"assignee_id,omitempty" validate:"omitempty,min=0"`
DueDate *string `json:"due_date,omitempty" validate:"omitzero,datetime=2006-01-02"`
Comment *string `json:"comment,omitempty" validate:"omitempty,max=10000"`
}
TaskUpdateRequest represents the request body for updating a task. All fields are optional to support partial updates.
@Description Task update request with optional fields for partial updates.
Click to show internal directories.
Click to hide internal directories.