Documentation
¶
Index ¶
- type Comment
- type CreateCommentRequest
- type CreateCommentResponse
- type CreateRequest
- type CreateResponse
- type DeleteRequest
- type DeleteResponse
- type GetCommentsRequest
- type GetCommentsResponse
- type GetRequest
- type GetResponse
- type Handler
- func (h *Handler) Create(c *gin.Context)
- func (h *Handler) CreateComment(c *gin.Context)
- func (h *Handler) Delete(c *gin.Context)
- func (h *Handler) Get(c *gin.Context)
- func (h *Handler) GetComments(c *gin.Context)
- func (h *Handler) List(c *gin.Context)
- func (h *Handler) Transition(c *gin.Context)
- func (h *Handler) Update(c *gin.Context)
- type ListRequest
- type ListResponse
- type Service
- func (s *Service) Create(ctx context.Context, req *CreateRequest) (*CreateResponse, error)
- func (s *Service) CreateComment(ctx context.Context, req *CreateCommentRequest) (*CreateCommentResponse, error)
- func (s *Service) Delete(ctx context.Context, req *DeleteRequest) error
- func (s *Service) Get(ctx context.Context, req *GetRequest) (*GetResponse, error)
- func (s *Service) GetComments(ctx context.Context, req *GetCommentsRequest) (*GetCommentsResponse, error)
- func (s *Service) List(ctx context.Context, req *ListRequest) (*ListResponse, error)
- func (s *Service) Transition(ctx context.Context, req *TransitionRequest) (*TransitionResponse, error)
- func (s *Service) Update(ctx context.Context, req *UpdateRequest) (*UpdateResponse, error)
- type Ticket
- type TicketCommentCreateRequest
- type TicketCommentsRequest
- type TicketCommentsResponse
- type TicketCreateRequest
- type TicketDeleteRequest
- type TicketDetailRequest
- type TicketDetailResponse
- type TicketTransitionRequest
- type TicketUpdateRequest
- type TicketsListRequest
- type TicketsListResponse
- type TransitionRequest
- type TransitionResponse
- type UpdateRequest
- type UpdateResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateCommentRequest ¶
type CreateCommentRequest = TicketCommentCreateRequest
type CreateCommentResponse ¶
type CreateCommentResponse = TicketCommentsResponse
type CreateRequest ¶
type CreateRequest = TicketCreateRequest
type CreateResponse ¶
type CreateResponse = TicketDetailResponse
type DeleteRequest ¶
type DeleteRequest = TicketDeleteRequest
type DeleteResponse ¶
type DeleteResponse = TicketDetailResponse
type GetCommentsRequest ¶
type GetCommentsRequest = TicketCommentsRequest
type GetCommentsResponse ¶
type GetCommentsResponse = TicketCommentsResponse
type GetRequest ¶
type GetRequest = TicketDetailRequest
type GetResponse ¶
type GetResponse = TicketDetailResponse
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func (*Handler) CreateComment ¶
CreateComment handles the request to create a comment
func (*Handler) GetComments ¶
GetComments handles the request to get ticket comments
func (*Handler) Transition ¶
Transition handles the request to transition ticket status
type ListRequest ¶
type ListRequest = TicketsListRequest
Type aliases for service layer compatibility
type ListResponse ¶
type ListResponse = TicketsListResponse
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(svcCtx *svc.ServiceContext) *Service
func (*Service) Create ¶
func (s *Service) Create(ctx context.Context, req *CreateRequest) (*CreateResponse, error)
Create creates a new ticket
func (*Service) CreateComment ¶
func (s *Service) CreateComment(ctx context.Context, req *CreateCommentRequest) (*CreateCommentResponse, error)
CreateComment creates a new comment on a ticket
func (*Service) Delete ¶
func (s *Service) Delete(ctx context.Context, req *DeleteRequest) error
Delete deletes a ticket
func (*Service) Get ¶
func (s *Service) Get(ctx context.Context, req *GetRequest) (*GetResponse, error)
Get returns ticket details with comments
func (*Service) GetComments ¶
func (s *Service) GetComments(ctx context.Context, req *GetCommentsRequest) (*GetCommentsResponse, error)
GetComments returns comments for a ticket
func (*Service) List ¶
func (s *Service) List(ctx context.Context, req *ListRequest) (*ListResponse, error)
List returns a list of tickets
func (*Service) Transition ¶
func (s *Service) Transition(ctx context.Context, req *TransitionRequest) (*TransitionResponse, error)
Transition transitions a ticket to a new status
func (*Service) Update ¶
func (s *Service) Update(ctx context.Context, req *UpdateRequest) (*UpdateResponse, error)
Update updates a ticket
type Ticket ¶
type Ticket struct {
Id int64 `json:"id"`
Title string `json:"title"`
Content string `json:"content"`
Category string `json:"category"`
Priority string `json:"priority"`
Status string `json:"status"`
Assignee string `json:"assignee"`
Tags []string `json:"tags"`
PlayerId string `json:"playerId"`
Contact string `json:"contact"`
GameId string `json:"gameId"`
Env string `json:"env"`
Source string `json:"source"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
}
type TicketCommentsRequest ¶
type TicketCommentsRequest struct {
TicketID string `uri:"ticketId"`
}
type TicketCommentsResponse ¶
type TicketCommentsResponse struct {
Items []Comment `json:"items"`
}
type TicketCreateRequest ¶
type TicketCreateRequest struct {
Title string `json:"title"`
Content string `json:"content"`
Category string `json:"category"`
Priority string `json:"priority,optional,default=medium"`
Tags []string `json:"tags"`
PlayerId string `json:"playerId"`
Contact string `json:"contact"`
GameId string `json:"gameId"`
Env string `json:"env"`
}
type TicketDeleteRequest ¶
type TicketDeleteRequest struct {
ID string `uri:"id"`
}
type TicketDetailRequest ¶
type TicketDetailRequest struct {
ID string `uri:"id"`
}
type TicketDetailResponse ¶
type TicketTransitionRequest ¶
type TicketUpdateRequest ¶
type TicketsListRequest ¶
type TicketsListResponse ¶
type TransitionRequest ¶
type TransitionRequest = TicketTransitionRequest
type TransitionResponse ¶
type TransitionResponse = TicketDetailResponse
type UpdateRequest ¶
type UpdateRequest = TicketUpdateRequest
type UpdateResponse ¶
type UpdateResponse = TicketDetailResponse
Click to show internal directories.
Click to hide internal directories.