Skip to content

Commit

Permalink
Merge pull request #10 from weiwei04/compass-dev
Browse files Browse the repository at this point in the history
offset -> Start
  • Loading branch information
Wei Wei authored Aug 17, 2017
2 parents 778a821 + 0df33f0 commit 40e6457
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions pkg/api/client/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ type ListChartsResponse struct {
//}

type ListChartVersionsRequest struct {
Space string
Chart string
Limit int
offset int
Space string
Chart string
Limit int
Start int
}

type ListChartVersionsResponse struct {
Expand Down
6 changes: 3 additions & 3 deletions pkg/api/client/registry_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,17 +84,17 @@ func (r *helmRegistry) ListCharts(ctx context.Context, req *ListChartsRequest) (

// 列取mysapce/mychart的所有版本
func (r *helmRegistry) ListChartVersions(ctx context.Context, req *ListChartVersionsRequest) (*ListChartVersionsResponse, error) {
listResp, err := r.client.ListVersions(req.Space, req.Chart, req.offset, req.Limit)
listResp, err := r.client.ListVersions(req.Space, req.Chart, req.Start, req.Limit)
if err != nil {
return nil, err
}

return &ListChartVersionsResponse{
Versions: listResp.Items,
IsEnd: req.offset+len(listResp.Items) >= listResp.Metadata.Total,
IsEnd: req.Start+len(listResp.Items) >= listResp.Metadata.Total,
space: req.Space,
chart: req.Chart,
offset: req.offset,
offset: req.Start,
limit: req.Limit,
}, nil
}
Expand Down

0 comments on commit 40e6457

Please sign in to comment.