Skip to content

Commit

Permalink
add NewListObjectsPager method to service/dataset client (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
98sean98 authored Aug 30, 2023
1 parent ffff3ec commit 9de9b73
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions service/dataset/list_objects.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package dataset

import (
"context"
"github.com/deploifai/sdk-go/api/generated"
"github.com/deploifai/sdk-go/cloud_client/implementable"
)

type ListObjectsInput = implementable.ListObjectsInput

func (c *Client) NewListObjectsPager(ctx context.Context, where generated.DataStorageWhereUniqueInput, input *ListObjectsInput) (pager implementable.ListObjectsPager, err error) {

dataStorage, dataStorageContainer, err := getDataStorageAndContainer(ctx, c.options.API, where)
if err != nil {
return pager, err
}

dataStorageClient, err := newDataStorageClient(ctx, c.options.API, dataStorage, dataStorageContainer)
if err != nil {
return pager, err
}

return dataStorageClient.NewListObjectsPager(input), nil

}

0 comments on commit 9de9b73

Please sign in to comment.