api.go ×8

Frontier kind: Code frontier

unlabeled · c_e43ee1650f51

9 tests · 2648 LOC · 135 files · introduces 0 tests · 28 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
11 ranges28 lines · 2 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
401 ranges2648 lines · 135 files · Browse complete extent
All tests (intent)
9 testsBrowse complete intent

Neighbourhood graph

The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.

Introduced files, introduced tests, and structurally relevant concept specialization

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

No tests are introduced at this concept. Its intent tests are introduced by other concepts.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

2 files ranked by introduced lines: 28 introduced LOC across 11 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/service/history/api/getworkflowexecutionrawhistoryv2/api.go 16 introduced LOC · 8 ranges

Open complete file

168 request *historyservice.GetWorkflowExecutionRawHistoryV2Request,
169 versionHistories *historyspb.VersionHistories,
170 > ) (*historyspb.VersionHistory, error) { api.go
171 >
172 > req := request.Request
173 >
174 > targetBranch, err := versionhistory.GetCurrentVersionHistory(versionHistories)
175 > if err != nil {
176 return nil, err
177 }
178 > firstItem, err := versionhistory.GetFirstVersionHistoryItem(targetBranch) api.go
179 > if err != nil {
180 return nil, err
181 }
182 > lastItem, err := versionhistory.GetLastVersionHistoryItem(targetBranch) api.go
183 > if err != nil {
184 return nil, err
185 }
186
187 > if req.GetStartEventId() == common.EmptyEventID || req.GetStartEventVersion() == common.EmptyVersion { api.go
188 // If start event is not set, get the events from the first event
189 // As the API is exclusive-exclusive, use first event id - 1 here
191 req.StartEventVersion = firstItem.GetVersion()
192 }
193 > if req.GetEndEventId() == common.EmptyEventID || req.GetEndEventVersion() == common.EmptyVersion { api.go
194 // If end event is not set, get the events until the end event
195 // As the API is exclusive-exclusive, use end event id + 1 here
198 }
199
200 > if req.GetStartEventId() < 0 { api.go
201 return nil, consts.ErrInvalidFirstNextEventCombination
202 }
203
204 // get branch based on the end event if end event is defined in the request
205 > if req.GetEndEventId() == lastItem.GetEventId()+1 && api.go
206 > req.GetEndEventVersion() == lastItem.GetVersion() {
207 // this is a special case, target branch remains the same
208 > } else { api.go
209 endItem := versionhistory.NewVersionHistoryItem(req.GetEndEventId(), req.GetEndEventVersion())
210 idx, err := versionhistory.FindFirstVersionHistoryIndexByVersionHistoryItem(versionHistories, endItem)
go.temporal.io/server/api/adminservice/v1/request_response.pb.go 12 introduced LOC · 3 ranges

Open complete file

1153 }
1154
1155 > func (x *GetWorkflowExecutionRawHistoryV2Request) GetStartEventId() int64 { request_response.pb.go
1156 > if x != nil {
1157 > return x.StartEventId
1158 > }
1159 return 0
1160 }
1167 }
1168
1169 > func (x *GetWorkflowExecutionRawHistoryV2Request) GetEndEventId() int64 { request_response.pb.go
1170 > if x != nil {
1171 > return x.EndEventId
1172 > }
1173 return 0
1174 }
1175
1176 > func (x *GetWorkflowExecutionRawHistoryV2Request) GetEndEventVersion() int64 { request_response.pb.go
1177 > if x != nil {
1178 > return x.EndEventVersion
1179 > }
1180 return 0
1181 }