Commit 23c7f8a
authored
refactor(client): interfaceize service implementation (#151)
* refactor(measure): interface-ify MeasureService and implement with measureService
- Created a MeasureService interface to define the service's behavior
- Implemented MeasureService with a new measureService struct- Updated client.go to use the new MeasureService interface
- Refactored LifeTimes method to use the new service implementation
Signed-off-by: Flc <[email protected]>
* refactor(attachment): interface-ify AttachmentService and implement new methods
- Add new methods to AttachmentService interface: - GetAttachmentDownloadURL - GetImageDownloadURL
- GetDocumentDownloadURL
- Implement the new methods in attachmentService struct
- Update client.go to use the new AttachmentService interface
Signed-off-by: Flc <[email protected]>
* refactor(comment): interface-ify CommentService and implement with commentService
- Define CommentService interface for comment-related operations
- Implement CommentService with commentService struct
- Update client.go to use new CommentService interface
Signed-off-by: Flc <[email protected]>
* refactor(api): simplify comment request structures
- Reduced the number of fields in GetCommentsRequest and GetCommentsCountRequest
- Improved code readability by using inline comments
- Removed unnecessary blank lines and excessive spacing
Signed-off-by: Flc <[email protected]>
* refactor(label): interface-ify LabelService and implement proper struct
- Define LabelService interface with all label-related methods
- Implement LabelService interface in labelService struct
- Update client.go to use LabelService interface instead of struct- Add context parameter to all methods for better request management
Signed-off-by: Flc <[email protected]>
* refactor(setting): interface-ize SettingService and implement with settingService
- Define SettingService interface with GetWorkspaceSetting method
- Implement SettingService with settingService struct
- Update client to use new SettingService interface
- Refactor GetWorkspaceSetting method to use new service implementation
Signed-off-by: Flc <[email protected]>
* refactor(workflow): interface-ify WorkflowService and implement GetAllLastSteps- Define WorkflowService interface with GetAllLastSteps method
- Create new workflowService struct and implement WorkflowService interface
- Update client.go to use new WorkflowService interface
Signed-off-by: Flc <[email protected]>
* refactor(report): interface-ize ReportService and implement with reportService
- Define ReportService interface to interact with report-related APIs
- Implement ReportService with reportService struct
- Update client.go to use new ReportService interface
- Refactor GetReports method to use new service implementation
Signed-off-by: Flc <[email protected]>
* refactor(workspace): restructure workspace service and improve type safety
- Restructured WorkspaceService interface to separate it from the concrete implementation
- Renamed concrete implementation to workspaceService
- Updated related imports and function signatures
- Improved type safety by using interface instead of pointer to struct
Signed-off-by: Flc <[email protected]>
* fix: types/v3-directive not published
Signed-off-by: Flc <[email protected]>
* refactor(client): improve BugService initialization and type
- Change BugService type from *BugService to BugService- Update BugService initialization to use NewBugService function
Signed-off-by: Flc <[email protected]>
* refactor(client): improve service initialization and naming consistency
- Update StoryService initialization to use NewStoryService function
- Remove unnecessary pointer allocations for StoryService and TaskService
- Improve consistency in service naming and initialization across the client
Signed-off-by: Flc <[email protected]>
* refactor(task): enhance TaskService implementation and improve type definitions
Signed-off-by: Flc <[email protected]>
---------
Signed-off-by: Flc <[email protected]>1 parent f9b6c7d commit 23c7f8a
File tree
13 files changed
+3478
-3400
lines changed13 files changed
+3478
-3400
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
21 | 70 | | |
22 | 71 | | |
23 | 72 | | |
24 | 73 | | |
25 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
26 | 97 | | |
27 | 98 | | |
28 | 99 | | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
37 | 106 | | |
38 | 107 | | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
| 108 | + | |
43 | 109 | | |
44 | 110 | | |
45 | 111 | | |
| |||
63 | 129 | | |
64 | 130 | | |
65 | 131 | | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
| 132 | + | |
75 | 133 | | |
76 | 134 | | |
77 | 135 | | |
| |||
90 | 148 | | |
91 | 149 | | |
92 | 150 | | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
| 151 | + | |
110 | 152 | | |
111 | 153 | | |
112 | 154 | | |
| |||
125 | 167 | | |
126 | 168 | | |
127 | 169 | | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
| 170 | + | |
151 | 171 | | |
152 | 172 | | |
153 | 173 | | |
| |||
0 commit comments