Documentation
¶
Index ¶
- type FeatureAdoption
- type Feedback
- type FeedbackCreateRequest
- type FeedbackCreateResponse
- type FeedbackDeleteRequest
- type FeedbackDetailResponse
- type FeedbackListRequest
- type FeedbackListResponse
- type FeedbackStats
- type FeedbackStatsRequest
- type FeedbackStatsResponse
- type FeedbackUpdateRequest
- type FeedbackUpdateResponse
- type Handler
- type Service
- func (s *Service) Create(ctx context.Context, req *FeedbackCreateRequest) (*FeedbackCreateResponse, error)
- func (s *Service) Delete(ctx context.Context, req *FeedbackDeleteRequest) error
- func (s *Service) List(ctx context.Context, req *FeedbackListRequest) (*FeedbackListResponse, error)
- func (s *Service) Stats(ctx context.Context, req *FeedbackStatsRequest) (*FeedbackStatsResponse, error)
- func (s *Service) Update(ctx context.Context, req *FeedbackUpdateRequest) (*FeedbackUpdateResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FeatureAdoption ¶
type FeatureAdoption struct {
Feature string `json:"feature"`
Users int `json:"users"`
AdoptionRate float64 `json:"adoptionRate"`
Frequency float64 `json:"frequency"`
}
FeatureAdoption represents feature adoption metrics
type Feedback ¶
type Feedback struct {
Id int64 `json:"id"`
PlayerId string `json:"playerId"`
Contact string `json:"contact"`
Content string `json:"content"`
Category string `json:"category"`
Priority string `json:"priority"`
Status string `json:"status"`
Rating int `json:"rating"` // 1-5星
Attach string `json:"attach"` // 附件URL
GameId string `json:"gameId"`
Env string `json:"env"`
Reply string `json:"reply"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
}
Feedback represents user feedback
type FeedbackCreateRequest ¶
type FeedbackCreateRequest struct {
PlayerId string `json:"playerId"`
Contact string `json:"contact"`
Content string `json:"content"`
Category string `json:"category"`
Rating int `json:"rating"`
Attach string `json:"attach"`
GameId string `json:"gameId"`
Env string `json:"env"`
}
FeedbackCreateRequest represents the request to create feedback
type FeedbackCreateResponse ¶
type FeedbackCreateResponse struct {
Feedback
}
FeedbackCreateResponse represents the response after creating feedback
type FeedbackDeleteRequest ¶
type FeedbackDeleteRequest struct {
ID string `uri:"id"`
}
FeedbackDeleteRequest represents the request to delete feedback
type FeedbackDetailResponse ¶
type FeedbackDetailResponse struct {
Feedback
}
FeedbackDetailResponse represents the response with feedback details
type FeedbackListRequest ¶
type FeedbackListRequest struct {
Page int `form:"page,optional,default=1"`
PageSize int `form:"pageSize,optional,default=20"`
Status string `form:"status"`
Category string `form:"category"`
GameId string `form:"gameId"`
}
FeedbackListRequest represents the request to list feedbacks
type FeedbackListResponse ¶
type FeedbackListResponse struct {
Items []Feedback `json:"items"`
Total int64 `json:"total"`
Page int `json:"page"`
Size int `json:"pageSize"`
}
FeedbackListResponse represents the response with a list of feedbacks
type FeedbackStats ¶
type FeedbackStats struct {
Total int `json:"total"`
ByCategory map[string]int `json:"byCategory"`
ByStatus map[string]int `json:"byStatus"`
AvgRating float64 `json:"avgRating"`
ResponseRate float64 `json:"responseRate"`
}
FeedbackStats represents feedback statistics
type FeedbackStatsRequest ¶
type FeedbackStatsRequest struct {
GameId string `form:"gameId"`
Days int `form:"days,optional,default=7"`
}
FeedbackStatsRequest represents the request to get feedback stats
type FeedbackStatsResponse ¶
type FeedbackStatsResponse struct {
FeedbackStats
}
FeedbackStatsResponse represents the response with feedback stats
type FeedbackUpdateRequest ¶
type FeedbackUpdateRequest struct {
ID string `uri:"id"`
Status string `json:"status"`
Priority string `json:"priority"`
Reply string `json:"reply"`
}
FeedbackUpdateRequest represents the request to update feedback
type FeedbackUpdateResponse ¶
type FeedbackUpdateResponse struct {
Feedback
}
FeedbackUpdateResponse represents the response after updating feedback
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
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 *FeedbackCreateRequest) (*FeedbackCreateResponse, error)
Create creates a new feedback
func (*Service) Delete ¶
func (s *Service) Delete(ctx context.Context, req *FeedbackDeleteRequest) error
Delete deletes a feedback
func (*Service) List ¶
func (s *Service) List(ctx context.Context, req *FeedbackListRequest) (*FeedbackListResponse, error)
List retrieves a paginated list of feedbacks
func (*Service) Stats ¶
func (s *Service) Stats(ctx context.Context, req *FeedbackStatsRequest) (*FeedbackStatsResponse, error)
Stats retrieves feedback statistics
func (*Service) Update ¶
func (s *Service) Update(ctx context.Context, req *FeedbackUpdateRequest) (*FeedbackUpdateResponse, error)
Update updates an existing feedback